Answer the question
In order to leave comments, you need to log in
What to do with SpeecRecogniter?
Faced here with such problem: the speech is written off but does not reach if why?
while True:
init()
engine = pyttsx3.init()
engine.say("Что открыть - Калькулятор, Вконтакте , Ютуб, Игра , Фигура, Погода ?")
engine.runAndWait()
print(Fore.GREEN)
r = sr.Recognizer()
with sr.Microphone(device_index=1) as source:
print("Что открыть - Калькулятор(1), Вконтакте(2), Ютуб(3), Игра(4), Фигура(5), Погода(6) ,выход(0) ?")
audio = r.listen(source)
query = r.recognize_google(audio, language = "ru-RU")
x = input(query)
if x =="калькулятор" or x == "1":
while True:
print(Fore.YELLOW)
engine.say("Что будем делать ?")
engine.runAndWait()
f=input("Что будем делать ? (+,-,*,/,**,//(корень) )")
if f == "+":
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question