Speech recognition module for Python, supporting several engines and APIs, online and offline.
Bugfix release!
exception_on_overflow
shenanigans. This version will eliminate those pesky ValueError
s.Special thanks to @michaelpri10 for reporting the exception_on_overflow
bug.
Fix for list_microphone_names
, courtesy of @ibutra. Fully compatible with 3.3.0.
See #85 for more details!
Changes since 3.2.0:
Major changes since 3.2.1:
Microphone
now throws an AttributeError
when created rather than not being defined.
hasattr
or getattr
.Major changes since 3.1.3:
Changes since 3.1.0:
Changes since 3.0.0:
The API has also changed somewhat. Here's a quick upgrade guide:
speech_recognition.Recognizer(language = "en-US", key = "AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw")
changed to speech_recognition.Recognizer()
.
speech_recognition.recognize_*
functions instead.recognizer_instance.listen
, speech_recognition.WaitTimeoutError
exceptions are thrown rather than OSError
exceptions upon timeout.recognizer_instance.listen_in_background
now blocks until the background listener actually stops before returning.recognizer_instance.recognize(audio_data, show_all = False)
has changed to recognizer_instance.recognize_google(audio_data, key = None, language = "en-US", show_all = False)
.
show_all
is set, the return value is the raw result from the API call, rather than a list of predictions and their confidences.speech_recognition.Recognizer()
constructor.speech_recognition.UnknownValueError
is now thrown instead of LookupError
when speech is unintelligible, and speech_recognition.RequestError
is now thrown instead of IndexError
or KeyError
when recognition fails.recognizer_instance.recognize_wit
and recognizer_instance.recognize_ibm
for recognizing with Wit.ai or IBM Speech to Text.To download, go to the PyPI page!