R
R
R1kJunior2022-02-14 09:56:42
Python
R1kJunior, 2022-02-14 09:56:42

Why the code does not accept what I say how to fix it?

import speech_recognition

sr = speech_recognition.Recognizer()
sr.pause_threshold = 0.5

with speech_recognition.Microphone() as mic:
    audio = sr.listen(source=mic)
    query = sr.recognize_google(audio_data=audio, language='ru-RU').lower()

print (query)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question