voice-sdk
Providers

Overview

Compare the supported providers and what differs between them.

Three providers are supported. All of them implement the four capabilities.

ttssttrealtimeTTSrealtimeSTTlistVoicesTimings
CartesiaYesYesYesYesYesWord
DeepgramYesYesYesYesNoNone
ElevenLabsYesYesYesYesYesCharacter

Differences that affect your code

Voice selection. Cartesia and ElevenLabs require a voice id for synthesis and have no default. Set defaultVoice on the provider or pass voice on each call. Deepgram encodes voice and language in the model name, so aura-2-thalia-en selects both.

Timings. Cartesia reports word-level timings and ElevenLabs reports character-level timings. Deepgram does not report timings, so passing timings throws a ValidationError.

Audio formats. Sample rates and containers differ. Each provider page includes its supported combinations. All three are mono only.

Realtime endpoints. Cartesia and Deepgram each have two realtime transcription endpoints. Cartesia selects between them using turnDetection; Deepgram selects using the model. Both are normalised to the same event stream.

Switching providers

Changing provider is a change to the constructor:

// Before
const voice = new Voice({ provider: new DeepgramProvider() });

// After
const voice = new Voice({ provider: new CartesiaProvider({ defaultVoice }) });

Code that uses providerOptions is the exception, since those fields are specific to one API.

Adding a provider

The four capabilities are defined as an interface, so you can implement a provider for any API. See Writing a provider.

On this page