AssemblyAI

Asynchronous audio transcription behind one await.

AssemblyAITranscriptionModel conforms to TranscriptionModel and works with transcribe.

let result = try await transcribe(
  model: AssemblyAITranscriptionModel(), // universal-3-5-pro
  audio: audioData,
  mediaType: "audio/mpeg"
)
print(result.text)

The model reads ASSEMBLYAI_API_KEY, defaults to universal-3-5-pro, and uses https://api.assemblyai.com. It uploads the audio, creates a transcript, and polls until completion internally.

Use pollInterval and pollTimeout on the model initializer to tune polling. AssemblyAI-specific transcript settings can be passed through providerOptions.

Models

Model IDUse
universal-3-5-proCurrent highest-accuracy Universal model
universal-2Previous Universal generation

Availability can vary by API mode and language. See AssemblyAI's Universal-3.5 Pro guide and the speech_model API field.

On this page