This step-by-step guide shows how to switch your realtime transcription from AssemblyAI to Gladia with minimal code changes. It highlights equivalences, subtle differences, and drop‑in replacements so you can migrate quickly and confidently, without any regressions.Documentation Index
Fetch the complete documentation index at: https://docs.gladia.io/llms.txt
Use this file to discover all available pages before exploring further.
Step-by-step guide
Install the SDK
Install the official SDKs to enable realtime streaming. That’s all you need to get started in Python or TypeScript. For AssemblyAI :Initialize the client
Create and authenticate the client that manages your live connection. The shape is the same idea across providers—just swap the client and key. For AssemblyAI :Configure the session
Choose the model, audio format, and language options your app needs. Most parameters map one‑to‑one, so your existing settings carry over naturally.AssemblyAI to Gladia parameter mapping
| AssemblyAI | Gladia | Notes / Example |
|---|---|---|
model | model | Choose the latest Gladia model (“solaria-1”). |
encoding | encoding | Match the actual audio format (e.g., linear16 ↔ wav/pcm). |
bit_depth | Choose the bit depth value from your audio | |
sample_rate | sample_rate | Same unit (Hz). |
channels | channels | Same meaning. |
interim_results | messages_config.receive_partial_transcripts | Set true to receive partials messages. |
endpointing | endpointing; maximum_duration_without_endpointing | Port thresholds and consider a hard cap. |
language | language_config.languages (+ code_switching) | Pass one or more languages; enable switching when multiple languages are spoken. |
Gladia config example
Start the transcription session
Open a live transcription session using your configuration. The flow is the same as with AssemblyAI: establish the WebSocket and get ready to stream audio. For AssemblyAI :Send audio chunks
Stream audio frames to the session as they are produced. Both SDKs accept small chunks continuously—keep your existing chunking logic. For AssemblyAI :Read transcription messages
After audio is flowing, subscribe to transcript and lifecycle events. The mapping below shows how to translate AssemblyAI listeners to Gladia in a single place. Event mapping from AssemblyAI to Gladia:Transcript→ listen to Gladiamessageand branch onmessage.data.is_finalto separate partial vs final results.Open/Close/Error→ map to Gladiastarted/ended/error.
message and use the is_final flag instead of wiring separate listeners—less boilerplate, same control. To receive partials, enable messages_config.receive_partial_transcripts: true in your init config.
For AssemblyAI :