violet/voice.py
2022-12-26 17:12:50 +01:00

19 lines
291 B
Python

import sys
import colorama
import playsound
import violet
colorama.init(autoreset=True)
while True:
try:
prompt = violet.ask()
except KeyboardInterrupt:
sys.exit(0)
answer = violet.respond(prompt)
print(answer['colored'])
violet.say(answer['plain'])