max_headroom/main.py
maglore9900 08fa93898f fallback for TTS
modified the speak portion so that if you are not using alltalk it will respond like a robot locally
2024-08-27 23:29:00 -04:00

20 lines
397 B
Python

from modules import agent, speak
import asyncio
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
sp = speak.Speak()
graph = agent.Agent()
while True:
print("Listening...")
text = sp.listen()
if text and "max" in text.lower():
response = loop.run_until_complete(graph.invoke_agent(text))
if response:
sp.glitch_stream_output2(response)