For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
PlaygroundChangelogSign In
OverviewAPI ReferencePre-recorded STTStreaming STTVoice AgentsSpeech UnderstandingGuardrailsLLM GatewayFAQ
OverviewAPI ReferencePre-recorded STTStreaming STTVoice AgentsSpeech UnderstandingGuardrailsLLM GatewayFAQ
  • Getting started
    • Transcribe a pre-recorded audio file
    • Model selection
    • View model benchmarks
    • Evaluate model accuracy
    • Cloud endpoints & data residency
    • Manage concurrent requests
    • Webhooks
  • Models
    • Medical Mode
  • Features
    • Boost specific terms
    • Label speakers
    • Transcribe multiple audio channels
    • Transcribe audio with mixed languages
    • Correct spelling of terms
    • Include filler words
    • Search for words in transcript
    • Set the start and end of the transcript
  • Guides
      • Migration guide Deepgram to AssemblyAI
      • Migration guide OpenAI to AssemblyAI
      • Migration guide AWS Transcribe to AssemblyAI
      • Migration guide Google Speech-to-Text to AssemblyAI
      • Migration guide Gladia to AssemblyAI
LogoLogo
PlaygroundChangelogSign In
On this page
  • Get Started
  • Side-by-side code comparison
  • Installation
  • Audio File Sources
  • Basic Transcription
  • Adding Features
GuidesMigration guides

Migration guide: AWS Transcribe to AssemblyAI

Was this page helpful?
Previous

Migration guide: Google Speech-to-Text to AssemblyAI

Next
Built with

This guide walks through the process of migrating from AWS Transcribe to AssemblyAI for transcribing pre-recorded audio.

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 AWS Transcribe and AssemblyAI:

AWS Transcribe
AssemblyAI
1import time
2import boto3
3
4def transcribe_file(job_name, file_uri, transcribe_client):
5 transcribe_client.start_transcription_job(
6 TranscriptionJobName=job_name,
7 Media={"MediaFileUri": file_uri},
8 MediaFormat="wav",
9 LanguageCode="en-US",
10 )
11
12 max_tries = 60
13 while max_tries > 0:
14 max_tries -= 1
15
16 job = transcribe_client.get_transcription_job(
17 TranscriptionJobName=job_name
18 )
19
20 job_status = job["TranscriptionJob"]["TranscriptionJobStatus"]
21
22 if job_status in ["COMPLETED", "FAILED"]:
23 print(f"Job {job_name} is {job_status}.")
24
25 if job_status == "COMPLETED":
26 print(
27 f"Download the transcript from\n"
28 f"\t{job['TranscriptionJob']['Transcript']['TranscriptFileUri']}."
29 )
30 break
31 else:
32 print(f"Waiting for {job_name}. Current status is {job_status}.")
33 time.sleep(10)
34
35def main():
36 transcribe_client = boto3.client("transcribe")
37 file_uri = "s3://test-transcribe/answer2.wav"
38 transcribe_file("Example-job", file_uri, transcribe_client)
39
40if name == "main":
41 main()

Installation

AWS Transcribe
AssemblyAI
1import boto3
2import time
3
4transcribe_client = boto3.client("transcribe")

When migrating from AWS to AssemblyAI, you’ll first need to handle authentication and SDK setup:

Get your API key from your AssemblyAI dashboard

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

AWS Transcribe
AssemblyAI
1def transcribe_file(job_name, file_uri, transcribe_client):
2 transcribe_client.start_transcription_job(
3 TranscriptionJobName=job_name,
4 Media={"MediaFileUri": file_uri},
5 MediaFormat="wav",
6 LanguageCode="en-US",
7 )

Here are helpful things to know when migrating your audio input handling:

  • There’s no need to specify the audio format to AssemblyAI - it’s auto-detected. AssemblyAI accepts almost every audio/video file type: here is a full list of all our supported file types
  • Our SDK handles file upload and transcription automatically in one step
  • For S3 files, you’ll need to generate pre-signed URLs (see example in cookbook)

Basic Transcription

AWS Transcribe
AssemblyAI
1while max_tries > 0:
2 max_tries -= 1
3 job = transcribe_client.get_transcription_job(
4 TranscriptionJobName=job_name
5 )
6 job_status = job["TranscriptionJob"]["TranscriptionJobStatus"]
7 if job_status in ["COMPLETED", "FAILED"]:
8 break
9 time.sleep(10)

Here are helpful things to know about our transcribe method:

  • The SDK handles polling under the hood
  • Transcript is directly accessible via transcript.text
  • English is the default language. We recommend specifying speech_models=["universal-3-pro", "universal-2"] for the highest accuracy
  • We have a cookbook for error handling common errors when using our API.

Adding Features

AWS Transcribe
AssemblyAI
1transcribe_client.start_transcription_job(
2 TranscriptionJobName=job_name,
3 Media={"MediaFileUri": file_uri},
4 Settings={
5 "ShowSpeakerLabels": True,
6 "MaxSpeakerLabels": 2
7 }
8)

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