Gladia's live API transcribes audio in real-time over WebSocket.
SDK-first: always use the official SDK — see gladia-sdk-integration for policy, setup, and fallback criteria.
When NOT to use: If the user has a pre-existing audio/video file or URL to transcribe after the fact, use the gladia-pre-recorded-transcription skill instead. Pre-recorded supports additional features like speaker diarization and PII redaction that are unavailable in live mode.
Consult these resources as needed:
startSession() config (JS + Python)get, list, getFile, deleteEndpointMethodSDK equivalent/v2/livePOSTstartSession()``/v2/liveGETlist()``/v2/live/:idGETget(id)``/v2/live/:idDELETEdelete(id)``/v2/live/:id/fileGETgetFile(id)WebSocket URL from init—sendAudio() / session.on()
SDK flow: startSession() -> sendAudio() -> receive transcript events -> stopRecording() -> get(id) for final result.
For SDK installation and client initialization, see the gladia-sdk-integration skill.
typescript
const session = client.liveV2().startSession({
model: "solaria-1",
encoding: "wav/pcm",
sample_rate: 16000,
bit_depth: 16,
channels: 1,
language_config: { languages: ["en"] },
messages_config: { receive_partial_transcripts: true },
});
session.on("message", (msg) => {
if (msg.type === "transcript") console.log(msg.data.utterance.text);
});
session.sendAudio(audioBuffer);
session.stopRecording();
python
from gladiaio_sdk import (
LiveV2InitRequest,
LiveV2LanguageConfig,
LiveV2MessagesConfig,
LiveV2WebSocketMessage,
)
live_client = client.live()
session = live_client.start_session(
LiveV2InitRequest(
model="solaria-1",
encoding="wav/pcm",
sample_rate=16000,
bit_depth=16,
channels=1,
language_config=LiveV2LanguageConfig(languages=["en"]),
messages_config=LiveV2MessagesConfig(receive_partial_transcripts=True),
)
)
@session.on("message")
def on_message(message: LiveV2WebSocketMessage):
if message.type == "transcript":
print(message.data.utterance.text.strip())
session.send_audio(audio_bytes)
session.stop_recording()
Core fields to set on every session:
encoding, sample_rate, bit_depth, channels (must exactly match the stream)language_config.languages and optional code_switchingmessages_config.receive_partial_transcripts and speech eventspre_processing, realtime_processing, post_processingSee ./references/session-config.md for full examples and gladia-sdk-integration for client retry/timeout settings.
endpointing is the primary latency-versus-completeness control for final transcripts.
Use caseRecommended valueVoice agent0.05 - 0.1Call center0.1 - 0.3Live subtitles0.2 - 0.4Meeting recorder0.3 - 0.5
For maximum_duration_without_endpointing, speech_threshold, and full tuning guidance, see ./references/recommended-params.md.
Use session.sendAudio(chunk) (JS) / session.send_audio(chunk) (Python) to stream audio data. The SDK sends each chunk as a binary WebSocket frame.
encoding, sample_rate, bit_depth, and channels in session configtypescript
session.stopRecording(); // Triggers post-processing, then session ends
python
session.stop_recording() # Triggers post-processing, then session ends
typescript
session.endSession(); // Immediately closes, no post-processing
python
session.end_session() # Immediately closes, no post-processing
SDK reconnection is automatic ( wsRetry). For raw WebSocket fallback, reconnect to the same URL.
ConstraintValueMax session duration3 hoursSupported encodingswav/pcm, wav/alaw, wav/ulawConcurrency (paid)30 concurrent sessionsConcurrency (free)1 concurrent sessionBillingPer-second of streamed audioMulti-channelBilled as N x duration
Use SDK methods for post-capture operations:
client.liveV2().get(id), .list(filters), .getFile(id), .delete(id)client.live().get(id), .list(filters), .get_file(id), .delete(id)For full examples and pagination filters, see ./references/managing-sessions.md.
encoding, sample_rate, bit_depth, and channels in session config MUST match the actual audio stream exactly.stopRecording() keeps it hanging./v2/live/:id/file, not /v2/live/:id/audio.For the full list of gotchas and diagnostics, see the gladia-troubleshooting skill.