max_headroom/main2.py
2024-08-27 22:57:24 -04:00

19 lines
409 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("openai")
while True:
text = sp.listen()
if text and "max" in text.lower():
response = loop.run_until_complete(graph.invoke_agent(text))
if response:
sp.glitch_stream_output(response)
print("Listening again...")