Migration guide: Google Speech-to-Text to AssemblyAI
This guide walks through the process of migrating from Google Speech-to-Text (STT) to AssemblyAI.
Get Started
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.
Side-by-side code comparison
Below is a side-by-side comparison of a basic snippet to transcribe a file by Google Speech-to-Text and AssemblyAI.
Google STT
AssemblyAI
Installation
Google STT
AssemblyAI
When migrating from Google Speech-to-Text to AssemblyAI, you’ll first need to handle authentication and SDK setup:
Get your API key from your AssemblyAI dashboard.
Check our documentation for the full list of available SDKs.
Things to know:
- Store your API key securely in an environment variable
- API key authentication works the same across all AssemblyAI SDKs
Audio File Sources
Google STT
AssemblyAI
Here are helpful things to know when migrating your audio input handling:
- There’s no need to specify the audio encoding format when using AssemblyAI - we have a transcoding pipeline under the hood which works on all supported file types so that you can get the most accurate transcription.
- You can submit a local file, URL, stream, buffer, blob, etc., directly to our transcriber. Check out some common ways you can host audio files here.
- You can transcribe audio files that are up to 10 hours long and you can transcribe multiple files in parallel. The default amount of jobs you can transcribe at once is 200 while on the PAYG plan.
Basic Transcription
Google STT
AssemblyAI
Here are helpful things to know about our transcribe
method:
- The SDK handles polling under the hood.
- The full transcript is directly accessible via
transcript.text
. - English is the default language if none is specified.
- We have a cookbook for error handling common errors when using our API.
Adding Features
Google STT
AssemblyAI
Key differences:
- Use
aai.TranscriptionConfig
to specify any extra features that you wish to use. - The results for Speaker Diarization are stored in
transcript.utterances
. To see the full transcript response object, refer to our API Reference. - Check our documentation for our full list of available features and their parameters.