Skip to content

Voices and models

An agent hears, thinks and speaks in three stages: speech-to-text (STT), a language model (LLM), and text-to-speech (TTS). All three are AssemblyAI by default, billed to the one key in your .env. Come here when you want a different voice, a different model, or a different provider for any stage.

Each stage is a field on agent(), and anything you leave unset stays on the default — so swapping one thing is one line.

import { agent } from "@alexkroman1/aai";
import { assemblyAITts } from "@alexkroman1/aai/tts";
export default agent({ name: "My Agent", tts: assemblyAITts({ voice: "aai-michael" }) });

The ids are the voice_id slugs in ASSEMBLYAI_TTS_VOICES (@alexkroman1/aai/tts) — the aai- prefix is part of the id. Every library voice speaks all six supported languages; language picks which.

The type autocompletes but does not guard. The catalog belongs to the service, so a voice added after your SDK release still has to work.