v53

OpenAPI 3.1.0MITraw.githubusercontent.com2026-08-039357238.7 KB
Rooms

Synthesize speech and play it into a room

Synthesizes the provided text using the configured TTS provider and plays the audio into the room. When TTS_CACHE_ENABLED=true, identical requests (same text, voice, model, language, and prompt) are stored on disk in TTS_CACHE_DIR and persist across restarts, without calling the external provider.

post/rooms/{id}/tts

Request body

textstring required

Text to synthesize

voicestring required

Provider-specific voice identifier. ElevenLabs: voice name or ID. AWS Polly: voice ID (e.g. Joanna, Matthew). Google Cloud: voice name — either full format (e.g. en-US-Neural2-F) or short name for Gemini models (e.g. Achernar, Kore). Deepgram: model name (e.g. aura-2-asteria-en).

model_idstring required

Provider-specific model/engine. ElevenLabs: model ID. AWS Polly: engine (standard, neural, long-form, generative; default neural). Google Cloud: model name (e.g. gemini-2.5-pro-tts, chirp3-hd).

languagestring

Language code (e.g. "en-US", "pl-pl"). Required for Google Gemini TTS voices that use short names (e.g. Achernar). Auto-extracted from full voice names like en-US-Neural2-F.

promptstring

Style/tone instruction for promptable voice models (Google Gemini TTS only). E.g. "Read aloud in a warm, welcoming tone."

volumeinteger required

Volume adjustment in dB (-8 to 8)

provider'elevenlabs' | 'aws' | 'google' | 'deepgram'

TTS provider: "elevenlabs" (default), "aws", "google", or "deepgram"

api_keystring

ElevenLabs: API key override (falls back to ELEVENLABS_API_KEY env var). AWS: optional ACCESS_KEY:SECRET_KEY override (falls back to default AWS credential chain). Google Cloud: optional API key override (falls back to Application Default Credentials). Deepgram: API key override (falls back to DEEPGRAM_API_KEY env var).

Response

TTS playback started

instance_idstring

Instance identifier

statusstring required