violet/voice.py

19 lines
291 B
Python
Raw Permalink Normal View History

2022-12-26 14:12:49 +01:00
import sys
import colorama
2022-12-26 17:12:50 +01:00
import playsound
2022-12-26 14:12:49 +01:00
import violet
colorama.init(autoreset=True)
while True:
try:
2022-12-26 17:12:50 +01:00
prompt = violet.ask()
2022-12-26 14:12:49 +01:00
except KeyboardInterrupt:
sys.exit(0)
answer = violet.respond(prompt)
print(answer['colored'])
2022-12-26 17:12:50 +01:00
violet.say(answer['plain'])