diff --git a/backend/NLP.py b/backend/NLP.py new file mode 100644 index 0000000..8609335 --- /dev/null +++ b/backend/NLP.py @@ -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... diff --git a/backend/main.py b/backend/main.py new file mode 100644 index 0000000..f101906 --- /dev/null +++ b/backend/main.py @@ -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) \ No newline at end of file diff --git a/skills/alarms.py b/backend/skills/__init__.py similarity index 100% rename from skills/alarms.py rename to backend/skills/__init__.py diff --git a/backend/skills/alarms.py b/backend/skills/alarms.py new file mode 100644 index 0000000..94bf9d1 --- /dev/null +++ b/backend/skills/alarms.py @@ -0,0 +1,5 @@ + + +class Alarms: + def __init__(self): + self.trigger_phrase = "alarms" \ No newline at end of file diff --git a/backend/skills/cal.py b/backend/skills/cal.py new file mode 100644 index 0000000..36de8f9 --- /dev/null +++ b/backend/skills/cal.py @@ -0,0 +1,5 @@ + + +class Cal: + def __init__(self): + self.trigger_phrase = "calendar" \ No newline at end of file diff --git a/backend/skills/config.py b/backend/skills/config.py new file mode 100644 index 0000000..6fc1b92 --- /dev/null +++ b/backend/skills/config.py @@ -0,0 +1 @@ +ntfy_url="jgjaifnfi" \ No newline at end of file diff --git a/skills/config.py.example b/backend/skills/config.py.example similarity index 100% rename from skills/config.py.example rename to backend/skills/config.py.example diff --git a/backend/skills/gmail.py b/backend/skills/gmail.py new file mode 100644 index 0000000..89ea886 --- /dev/null +++ b/backend/skills/gmail.py @@ -0,0 +1,5 @@ + + +class Gmail: + def __init__(self): + self.trigger_phrase = "gmail" \ No newline at end of file diff --git a/backend/skills/gpt.py b/backend/skills/gpt.py new file mode 100644 index 0000000..2bef38e --- /dev/null +++ b/backend/skills/gpt.py @@ -0,0 +1,5 @@ + + +class GPT: + def __init__(self): + self.trigger_phrase = "gpt" \ No newline at end of file diff --git a/backend/skills/reminders.py b/backend/skills/reminders.py new file mode 100644 index 0000000..5d1d421 --- /dev/null +++ b/backend/skills/reminders.py @@ -0,0 +1,5 @@ + + +class Reminders: # ntfy.sh notification? + def __init__(self): + self.trigger_phrase = "reminders" \ No newline at end of file diff --git a/skills/timers.py b/backend/skills/timers.py similarity index 94% rename from skills/timers.py rename to backend/skills/timers.py index 54eae80..e399b89 100644 --- a/skills/timers.py +++ b/backend/skills/timers.py @@ -1,4 +1,4 @@ -from config import ntfy_url +from skills.config import ntfy_url import requests class Timers: diff --git a/backend/skills/todos.py b/backend/skills/todos.py new file mode 100644 index 0000000..c3fee86 --- /dev/null +++ b/backend/skills/todos.py @@ -0,0 +1,5 @@ + + +class Todos: # Notion api? + def __init__(self): + self.trigger_phrase = "todos" \ No newline at end of file diff --git a/backend/skills/weather.py b/backend/skills/weather.py new file mode 100644 index 0000000..d0fd520 --- /dev/null +++ b/backend/skills/weather.py @@ -0,0 +1,5 @@ + + +class Weather: #open weather map api + def __init__(self): + self.trigger_phrase = "weather" \ No newline at end of file diff --git a/backend/skills/wolfram.py b/backend/skills/wolfram.py new file mode 100644 index 0000000..712499b --- /dev/null +++ b/backend/skills/wolfram.py @@ -0,0 +1,5 @@ + + +class Wolfram: #wolfram alpha api + def __init__(self): + self.trigger_phrase = "wolfram" \ No newline at end of file diff --git a/main.py b/frontend/main.py similarity index 88% rename from main.py rename to frontend/main.py index 2b4281b..6e131a9 100644 --- a/main.py +++ b/frontend/main.py @@ -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. \ No newline at end of file diff --git a/frontend/tts.py b/frontend/tts.py new file mode 100644 index 0000000..862e162 --- /dev/null +++ b/frontend/tts.py @@ -0,0 +1 @@ +# make requests to https://github.com/synesthesiam/opentts and play resulting wav file \ No newline at end of file diff --git a/ai.py b/scratch/ai.py similarity index 100% rename from ai.py rename to scratch/ai.py diff --git a/setup.sh b/scratch/setup.sh similarity index 100% rename from setup.sh rename to scratch/setup.sh diff --git a/talk.py b/scratch/talk.py similarity index 100% rename from talk.py rename to scratch/talk.py diff --git a/test.html b/scratch/test.html similarity index 100% rename from test.html rename to scratch/test.html diff --git a/tts.py b/scratch/tts.py similarity index 100% rename from tts.py rename to scratch/tts.py diff --git a/untitled.py b/scratch/untitled.py similarity index 100% rename from untitled.py rename to scratch/untitled.py diff --git a/voice.py b/scratch/voice.py similarity index 100% rename from voice.py rename to scratch/voice.py diff --git a/skills/cal.py b/skills/cal.py deleted file mode 100644 index e69de29..0000000 diff --git a/skills/gmail.py b/skills/gmail.py deleted file mode 100644 index e69de29..0000000 diff --git a/skills/gpt.py b/skills/gpt.py deleted file mode 100644 index e69de29..0000000 diff --git a/skills/reminders.py b/skills/reminders.py deleted file mode 100644 index e69de29..0000000 diff --git a/skills/todos.py b/skills/todos.py deleted file mode 100644 index e69de29..0000000 diff --git a/skills/weather.py b/skills/weather.py deleted file mode 100644 index e69de29..0000000 diff --git a/skills/wolfram.py b/skills/wolfram.py deleted file mode 100644 index e69de29..0000000