Select the Speech Model

We use a combination of models to produce your results. You can select the class of models to use in order to make cost-performance tradeoffs best suited for your application. You can visit our pricing page for more information on our model tiers.

NameSDK ParameterDescription
Slam-1aai.SpeechModel.slam_1Use our most customizable model for your transcription (English only).
Universal (default)aai.SpeechModel.universalUse our fastest, most robust models with the broadest language support.

You can change the model by setting the speech_model in the transcription config:

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
8
9config = aai.TranscriptionConfig(speech_model=aai.SpeechModel.slam_1)
10
11transcript = aai.Transcriber(config=config).transcribe(audio_file)
12
13if transcript.status == "error":
14 raise RuntimeError(f"Transcription failed: {transcript.error}")
15
16print(transcript.text)

For a list of the supported languages for each model, see Supported languages.