Skip to content

TTS providers

Every TTS plugin here is a wire protocol over the shared @kuralle-syrinx/tts-core lifecycle — multi-context streaming and usage billing work identically regardless of which one you pick.

import { CartesiaTTSPlugin } from '@kuralle-syrinx/cartesia';
const tts = new CartesiaTTSPlugin(socketFactory);
await tts.initialize(bus, {
api_key: process.env.CARTESIA_API_KEY!,
voice_id: process.env.CARTESIA_VOICE_ID,
model_id: 'sonic-3',
language: 'en',
});
KeyDefaultNotes
api_keyRequired.
voice_ida premade Cartesia voiceOverride with your own voice.
model_idsonic-3
languageen
output_container / output_encodingraw / pcm_s16le
cartesia_version2024-06-10API version header.

Multi-context WebSocket streaming — several concurrent TTS contexts on one connection, which is what makes fast barge-in cheap.

import { ElevenLabsTTSPlugin } from '@kuralle-syrinx/elevenlabs';
const tts = new ElevenLabsTTSPlugin(socketFactory);
await tts.initialize(bus, {
api_key: process.env.ELEVENLABS_API_KEY!,
voice_id: process.env.ELEVENLABS_VOICE_ID,
model_id: 'eleven_flash_v2_5',
sample_rate: 16000,
});
KeyDefaultNotes
api_keyRequired.
voice_ida free-tier-accessible premade voiceLibrary voices (e.g. Rachel) require a paid plan.
model_ideleven_flash_v2_5
sample_rate16000

Usage is billed on audio received, not on the provider’s isFinal flag — a rejected generation never bills.

import { DeepgramTTSPlugin } from '@kuralle-syrinx/deepgram';
const tts = new DeepgramTTSPlugin(socketFactory);
await tts.initialize(bus, {
api_key: process.env.DEEPGRAM_API_KEY!,
model: 'aura-2-thalia-en',
});
KeyDefaultNotes
api_keyRequired.
modelaura-2-thalia-enPicks both voice and language.

Non-streaming (chunked): the full text is sent and the complete audio comes back in one response.

import { GeminiTTSPlugin } from '@kuralle-syrinx/gemini';
const tts = new GeminiTTSPlugin();
await tts.initialize(bus, {
api_key: process.env.GEMINI_API_KEY!,
model: 'gemini-3.1-flash-tts-preview',
voice_name: 'Kore',
sample_rate: 24000,
});
KeyDefaultNotes
api_keyRequired.
modelgemini-3.1-flash-tts-previewAlso: gemini-2.5-flash-preview-tts, gemini-2.5-pro-preview-tts.
voice_nameKoreOne of Kore, Puck, Charon, Fenrir, Leda, Aoede, Zephyr, Orus.
instructionemptyA style/persona lead-in prepended to every utterance. Empty by default — set it explicitly if you want one.
language_code
sample_rate24000
import { GrokTTSPlugin } from '@kuralle-syrinx/grok/tts';
const tts = new GrokTTSPlugin(socketFactory);
await tts.initialize(bus, {
api_key: process.env.XAI_API_KEY!,
voice_id: 'eve',
sample_rate: 16000,
});
KeyDefaultNotes
api_keyRequired.
voice_ideve
sample_rate16000

OpenAICompatibleTTSPlugin speaks the OpenAI POST /v1/audio/speech streaming contract, so it works against OpenAI’s own TTS or any self-hosted / third-party endpoint that implements the same API.

import { OpenAICompatibleTTSPlugin } from '@kuralle-syrinx/openai-tts';
const tts = new OpenAICompatibleTTSPlugin();
await tts.initialize(bus, {
api_key: process.env.OPENAI_API_KEY!,
model: 'gpt-4o-mini-tts',
voice: 'alloy',
});
KeyDefaultNotes
base_urlhttps://api.openai.com/v1Point this at a self-hosted endpoint to use a different backend.
api_key
modelgpt-4o-mini-tts
voice
response_formatpcm
source_sample_rate_hz24000The provider’s output sample rate.
sample_rate16000Engine rate to resample to.
tempo1.0Pitch-preserving time-stretch (0.51.5) via a built-in WSOLA stretcher — use 0.9 to slow speech 10% without changing pitch.
extra_bodyMerged into the request body last; use it for any provider-specific field the plugin doesn’t enumerate.
  • Want the widest voice library and fastest barge-in? ElevenLabs’ multi-context streaming.
  • Want a large multilingual catalog with per-language model selection? Cartesia.
  • Already on Deepgram for STT? Aura keeps you on one vendor and one bill.
  • Have a self-hosted or fine-tuned TTS model? OpenAICompatibleTTSPlugin against your own base_url — no custom plugin required as long as it speaks the OpenAI speech API shape.

See Usage & pricing for cited per-character rates.