Streaming - Websocket
Bodhi’s Streaming API delivers low-latency, real-time speech recognition in 12+ Indian languages; built for fast, accurate voice experiences.
📚 Requirements
SDK Example
Install the SDK
# Set environment variables
# export CUSTOMER_ID=<bodhi_customer_id>
# export API_KEY=<bodhi_api_key>
# Install the Bodhi Python SDK
pip install bodhi-sdkfrom bodhi import (
BodhiClient,
TranscriptionResponse,
LiveTranscriptionEvents,
)
client = BodhiClient(api_key=API_KEY, customer_id=CUSTOMER_ID)
client.on(LiveTranscriptionEvents.Transcript, on_transcript)
client.on(LiveTranscriptionEvents.UtteranceEnd, on_utterance_end)
client.on(LiveTranscriptionEvents.SpeechStarted, on_speech_started)
client.on(LiveTranscriptionEvents.Error, on_error)
client.on(LiveTranscriptionEvents.Close, on_close)
Transcribing from Live Streaming
Non-SDK Example
Establish connection
Configure connection
Send and Receive Audio
Next Steps
Last updated