Skip to main content

Text-to-speech models

If you omit model_type, requests use chariot-v0. The older spelling v0 is accepted for compatibility. Use the full names in new integrations.

Select a model

For both POST /v1/tts and POST /v1/tts/stream, pass model_type in the JSON body:
Replace VOICE_ID with a UUID from GET /v1/voices. Select a voice whose models array includes the requested model. Copy its model value into the request’s model_type field. For the WebSocket, put these settings in the connection URL:
Authenticate with the chariotai-api-key header, or add api_key=YOUR_API_KEY when your WebSocket client cannot set headers. Model and speed stay fixed for the session. Open a new connection to change them. An unavailable model or an unsupported voice/model combination returns HTTP 422. On the WebSocket, it sends an error and closes with 1008.

Speaking rate

speed defaults to 1.0. Chariot v0 supports only 1.0. Chariot Multilingual v1 supports additional rates when they are available for the selected voice. Read the selected entry’s models[].speeds from GET /v1/voices. Choose one of those values rather than any number between the schema bounds of 0.5 and 2.0. An unavailable rate returns HTTP 422 or closes the WebSocket with 1008.

Quality and latency

optimize_streaming_latency accepts an integer from 0 to 4 and defaults to 0. The default applies all quality passes. Higher values apply more aggressive latency optimizations and may reduce output quality. Pass it in the HTTP JSON body or as a WebSocket query parameter.

Input limits

HTTP endpoints trim surrounding whitespace before checking length. Text must contain at least one character. Sync can split longer input internally and returns one assembled WAV file, within the model’s sync limit above. On the WebSocket, both each input.text fragment and the accumulated unflushed buffer must fit the model’s buffer limit. Whitespace in fragments counts toward that limit. Send input.flush before adding text that would exceed it. You can repeat this over one session without a fixed total text limit.

Audio formats

Speech-to-text models

chariot-1-asr-realtime is the default and only speech-to-text model, so you can omit model_type. To set it explicitly, add it to the WebSocket URL:
For synchronous file transcription, send model_type as a multipart form field. For async transcription, set it on each input in the manifest or JSON body. All three APIs accept a transcription language and an output style (codemix or native). Streaming supports balanced and high_accuracy; file and async transcription support only high_accuracy. See Languages, modes, and styles.