Overview
Performs speech recognition using the Houndify API. Houndify provides fast, accurate speech recognition with support for custom domains and commands.Method Signature
Parameters
The audio data to recognize. Must be an
AudioData instance.Houndify client ID (Base64-encoded string).See setup instructions below for how to obtain credentials.
Houndify client key (Base64-encoded string).
If
True, returns the raw API response as a JSON dictionary. If False, returns a tuple of (transcript, confidence).Returns
When
show_all=False, returns (transcript, confidence) where:transcript: The recognized textconfidence: Confidence score between 0 and 1
When
show_all=True, returns the raw API response containing:Disambiguation: Recognition resultsChoiceData: List of alternatives with transcriptions and confidence scores
Exceptions
Raised when the speech is unintelligible
Raised when:
- The API request fails
- The client ID or key is invalid
- There is no internet connection
Example Usage
Basic Recognition
Getting Full API Response
From Audio File
Using Environment Variables
Setup Instructions
1. Create Houndify Account
- Go to Houndify
- Sign up for a free account
- Log in to the Houndify Dashboard
2. Register a New Client
- In the dashboard, click Register a new client
- Fill in the form:
- Client Name: Give your client a name
- Platform: Select appropriate platform
- Continue to Enable Domains page
3. Enable Speech to Text Domain
- On the Enable Domains page, find Speech To Text Only
- Toggle it to ON
- Click Save & Continue
4. Get Client ID and Key
- Go to the Houndify Dashboard
- Find your client and click View Details
- On the client details page, you’ll see:
- Client ID: Base64-encoded string
- Client Key: Base64-encoded string
- Copy both values
5. Use in Code
Language Support
Currently, only English is supported for speech recognition through the “Speech To Text Only” domain. For multilingual support, you would need to use Houndify’s full voice assistant capabilities with custom domains.Features
- Fast Recognition: Houndify is known for low-latency responses
- High Accuracy: Good accuracy for conversational speech
- Confidence Scores: Returns confidence with each transcription
- Free Tier: Includes free tier for development and testing
Notes
- Requires internet connection
- Audio must be 8 kHz or 16 kHz sample rate
- Audio is automatically converted to 16-bit samples
- Returns both transcript and confidence score
- Client ID and key are Base64-encoded strings
- Free tier available with usage limits
- Primarily designed for English language