Answer the question
In order to leave comments, you need to log in
Why doesn't speech recognition work?
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("Скажите что-нибудь")
audio = r.listen(source)
try:
print(r.recognize_google(audio, language="ru-RU"))
except sr.UnknownValueError:
print("Робот не расслышал фразу")
except sr.RequestError as e:
print("Ошибка сервиса; {0}".format(e))
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