Migration guide: Gladia to AssemblyAI
Migration guide: Gladia to AssemblyAI
Migration guide: Gladia to AssemblyAI
This guide walks through the process of migrating from Gladia to AssemblyAI for transcribing pre-recorded audio.
Before we begin, make sure you have an AssemblyAI account and an API key. You can sign up for a free account and get your API key from your dashboard. If you’d prefer to use one of our official SDKs, check our documentation for the full list of available SDKs.
The Gladia documentation uses cURL commands to demonstrate API usage. In this guide, we will use Python code snippets to illustrate the same functionality across both APIs. If you prefer to use cURL, you can find the equivalent commands in the AssemblyAI API Reference.
Below is a side-by-side comparison of a basic snippet to transcribe pre-recorded audio with Gladia and AssemblyAI:
When migrating from Gladia to AssemblyAI, you’ll first need to handle authentication:
Get your API key from your AssemblyAI dashboard.
Things to know:
Gladia uses the x-gladia-key HTTP header for authentication, while
AssemblyAI uses the authorization header.
You can provide either a locally stored audio file or a publicly accessible URL.
Every few seconds, make a GET request to the /v2/pre-recorded/:transcript_id endpoint until the transcription status is 'done'.
Note that our APIs possible values for transcription status are queued, processing, completed, and error. Check out the AssemblyAI API Reference for the full list of possible transcription status values.
If you’d rather not poll the API, you can use our SDKs which handle polling internally. Alternatively, you can also use webhooks to get notified when your transcript is complete.
Here are helpful things to know when migrating your audio input handling:
Key differences:
speaker_labels, while Gladia uses diarization.transcript.utterances, while Gladia uses transcript.result.transcription.utterances.