Overview
Performs speech recognition using the Microsoft Bing Speech API. This is a legacy API that has been deprecated in favor of Azure Speech Services.Method Signature
Parameters
The audio data to recognize. Must be an
AudioData instance.Microsoft Bing Speech API key (32-character lowercase hexadecimal string).
Recognition language as a BCP-47 language tag (e.g.,
"en-US", "fr-FR", "de-DE").If
True, returns the raw API response as a JSON dictionary. If False, returns only the transcription text.Returns
The recognized text when
show_all=FalseWhen
show_all=True, returns the raw API responseExceptions
Raised when the speech is unintelligible
Raised when:
- The API request fails
- The API key is invalid
- There is no internet connection
Migration to Azure Speech
Recommended: Userecognize_azure() instead:
Notes
- This API is deprecated and may stop working at any time
- Migrate to Azure Speech Services for continued support
- Access tokens are cached for 10 minutes
- Audio is converted to 16 kHz, 16-bit samples