-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
20 lines (16 loc) · 698 Bytes
/
main.py
File metadata and controls
20 lines (16 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import json
from chat import Chat
from riva_wrap import RivaTTS
from assistant import Assistant
from wake_word import WakeWordDetector
from devices.mic_wrapper import Microphone
def main():
with open("secrets.json", "r") as f:
secrets = json.load(f)
riva = RivaTTS(api_url=secrets["riva_url"], rate=22050)
chat = Chat(secrets["openai_key"])
wake = WakeWordDetector(secrets["picovoice_key"], sample_rate=16000, keyword_paths=["glados_de_windows_v3_0_0.ppn"], model_path="porcupine_params_de.pv")
assistant = Assistant(chat, riva, wake, mic_name="Anker Mic", speaker_name="Anker Speakers")
assistant.run()
if __name__ == "__main__":
main()