Version 3.0.0
- MULTIPLE SERVICE SUPPORT! Now you can use Google Speech Recognition, Wit.ai, or IBM Speech to Text to obtain the recognition results.
- Filtering for clicks and pops. This drastically reduces the number of false positives in phrase recognition.
- Better usage examples - ready-to-run and better organized.
The API has also changed somewhat. Here's a quick upgrade guide:
speech_recognition.Recognizer(language = "en-US", key = "AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw")changed tospeech_recognition.Recognizer().- The key and language are now specified in the
speech_recognition.recognize_*functions instead.
- The key and language are now specified in the
- For
recognizer_instance.listen,speech_recognition.WaitTimeoutErrorexceptions are thrown rather thanOSErrorexceptions upon timeout. - The stop function returned by
recognizer_instance.listen_in_backgroundnow blocks until the background listener actually stops before returning. recognizer_instance.recognize(audio_data, show_all = False)has changed torecognizer_instance.recognize_google(audio_data, key = None, language = "en-US", show_all = False).- Additionally, when
show_allis set, the return value is the raw result from the API call, rather than a list of predictions and their confidences. - Note that we specify the key and language here now rather than in the
speech_recognition.Recognizer()constructor. speech_recognition.UnknownValueErroris now thrown instead ofLookupErrorwhen speech is unintelligible, andspeech_recognition.RequestErroris now thrown instead ofIndexErrororKeyErrorwhen recognition fails.
- Additionally, when
- Added
recognizer_instance.recognize_witandrecognizer_instance.recognize_ibmfor recognizing with Wit.ai or IBM Speech to Text.
To download, go to the PyPI page!