Transcript status

After you’ve submitted a file for transcription, your transcript has one of the following statuses:

StatusDescription
processingThe audio file is being processed.
queuedThe audio file is waiting to be processed.
completedThe transcription has completed successfully.
errorAn error occurred while processing the audio file.

Handling errors

If the transcription fails, the status of the transcript is error, and the transcript includes an error property explaining what went wrong.

1import assemblyai as aai
2
3aai.settings.api_key = "<YOUR_API_KEY>"
4
5# audio_file = "./local_file.mp3"
6audio_file = "https://assembly.ai/wildfires.mp3"
7
8config = aai.TranscriptionConfig()
9
10transcript = aai.Transcriber().transcribe(audio_file, config)
11
12if transcript.status == aai.TranscriptStatus.error:
13 print(f"Transcription failed: {transcript.error}")
14 exit(1)
15
16print(transcript.text)

A transcription may fail for various reasons:

  • Unsupported file format
  • Missing audio in file
  • Unreachable audio URL

If a transcription fails due to a server error, we recommend that you resubmit the file for transcription to allow another server to process the audio.

A “400 Bad Request” error typically indicates that there’s a problem with the formatting or content of the API request. Double-check the syntax of your request and ensure that all required parameters are included as described in the API reference. If the issue persists, contact our support team for assistance.