Skip to main content
Gradium Speech-to-Speech (S2S) translates spoken audio from one language into spoken audio in another, over a single duplex WebSocket. The input audio is transcribed, translated into the target language, and re-synthesized as output audio. You stream audio in and receive both the synthesized output audio and the translated transcript back as they’re produced.

Model

The only currently supported S2S model is live translation. To use it, send a setup message with model_name set to "s2s-translate", stt_model_name set to "stt-translate", and tts_model_name set to "default". Choose the target language with target_language in json_config, and the output voice with voice_id (required; it must be a voice in the target language).
{
  "type": "setup",
  "model_name": "s2s-translate",
  "stt_model_name": "stt-translate",
  "tts_model_name": "default",
  "input_format": "pcm",
  "output_format": "pcm",
  "voice_id": "YTpq7expH9539ERJ",
  "json_config": { "target_language": "en" }
}
For the full list of fields and formats, see Speech-to-Speech Settings.

Next steps

Use the WebSocket API

Stream audio in, output audio and transcript out, real-time or buffered.

S2S settings

voice_id, target_language, inner model selection, formats.

S2S WebSocket reference

Complete wire-level schema: every message type, every field, every error code.

Voices

Pick the voice used for the synthesized output.