reorganize codebase. Add in more of the framework for adding skills.
This commit is contained in:
parent
483ba60fa9
commit
0f085b0eb4
4
backend/NLP.py
Normal file
4
backend/NLP.py
Normal file
@ -0,0 +1,4 @@
|
||||
# Natural Language Processing using something like https://spacy.io
|
||||
|
||||
# this will allow us to figure out what the query means
|
||||
# i.e we might not have to add the word "wolfram" into a query to send it to wolfram...
|
17
backend/main.py
Normal file
17
backend/main.py
Normal file
@ -0,0 +1,17 @@
|
||||
from skills.alarms import Alarms
|
||||
from skills.cal import Cal
|
||||
from skills.gmail import Gmail
|
||||
from skills.gpt import GPT
|
||||
from skills.reminders import Reminders
|
||||
from skills.timers import Timers
|
||||
from skills.todos import Todos
|
||||
from skills.weather import Weather
|
||||
from skills.wolfram import Wolfram
|
||||
|
||||
skills = [GPT(), Alarms(), Cal(), Gmail(), Reminders(), Timers(), Todos(), Weather(), Wolfram()]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Skill Trigger Phrases: ")
|
||||
for skill in skills:
|
||||
print(skill.trigger_phrase)
|
5
backend/skills/alarms.py
Normal file
5
backend/skills/alarms.py
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
class Alarms:
|
||||
def __init__(self):
|
||||
self.trigger_phrase = "alarms"
|
5
backend/skills/cal.py
Normal file
5
backend/skills/cal.py
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
class Cal:
|
||||
def __init__(self):
|
||||
self.trigger_phrase = "calendar"
|
1
backend/skills/config.py
Normal file
1
backend/skills/config.py
Normal file
@ -0,0 +1 @@
|
||||
ntfy_url="jgjaifnfi"
|
5
backend/skills/gmail.py
Normal file
5
backend/skills/gmail.py
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
class Gmail:
|
||||
def __init__(self):
|
||||
self.trigger_phrase = "gmail"
|
5
backend/skills/gpt.py
Normal file
5
backend/skills/gpt.py
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
class GPT:
|
||||
def __init__(self):
|
||||
self.trigger_phrase = "gpt"
|
5
backend/skills/reminders.py
Normal file
5
backend/skills/reminders.py
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
class Reminders: # ntfy.sh notification?
|
||||
def __init__(self):
|
||||
self.trigger_phrase = "reminders"
|
@ -1,4 +1,4 @@
|
||||
from config import ntfy_url
|
||||
from skills.config import ntfy_url
|
||||
import requests
|
||||
|
||||
class Timers:
|
5
backend/skills/todos.py
Normal file
5
backend/skills/todos.py
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
class Todos: # Notion api?
|
||||
def __init__(self):
|
||||
self.trigger_phrase = "todos"
|
5
backend/skills/weather.py
Normal file
5
backend/skills/weather.py
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
class Weather: #open weather map api
|
||||
def __init__(self):
|
||||
self.trigger_phrase = "weather"
|
5
backend/skills/wolfram.py
Normal file
5
backend/skills/wolfram.py
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
class Wolfram: #wolfram alpha api
|
||||
def __init__(self):
|
||||
self.trigger_phrase = "wolfram"
|
@ -22,3 +22,6 @@ stop_listening = r.listen_in_background(m, callback)
|
||||
print("Listening...")
|
||||
while True:
|
||||
time.sleep(0.1)
|
||||
|
||||
|
||||
# TODO: Make api request to backend with resulting text in callback function.
|
1
frontend/tts.py
Normal file
1
frontend/tts.py
Normal file
@ -0,0 +1 @@
|
||||
# make requests to https://github.com/synesthesiam/opentts and play resulting wav file
|
Loading…
Reference in New Issue
Block a user