Skip to content

AssemblyAI

AssemblyAIProvider in the Vercel.AI.AssemblyAI namespace creates the AssemblyAI models that this port implements. The API reference lists every option: AssemblyAIProvider.

Browse the upstream catalog of AssemblyAI models and their pricing on the Vercel AI Gateway models page.

Kind Factory method Model ids in this port’s tests and docs
Speech Speech assemblyai-tts-1
Transcription Transcription assemblyai-stt-3-7, universal-2
Streaming transcription TranscriptionModel assemblyai-stt-3-7-realtime, assemblyai-stt-3-7-realtime-agent

A model id in the table is one that the tests or docs use. It is not the complete list of ids the provider accepts. Pass any id that the provider documents.

Speech model:

var model = AssemblyAIProvider.Create().Speech("assemblyai-tts-1");
var result = await model.GenerateAsync(
new AssemblyAISpeechRequest("Hello from the Vercel AI SDK for .NET.")
{
Voice = "aai-kyla",
},
CancellationToken.None
);
await File.WriteAllBytesAsync("speech.mp3", result.Audio);

snippet source | anchor

See the Providers guide for authentication and provider options.

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product