Text-to-speech (Json)
Synthesizes one or more input texts into speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech’s style and prosody.
The response includes the base64-encoded audio and metadata in JSON format.
Headers
Query parameters
Access token used for authenticating the client. If not provided, an api_key
must be provided to authenticate.
The access token is generated using both an API key and a Secret key, which provides an additional layer of security compared to using just an API key.
For more details, refer to the Authentication Strategies Guide.
Request
A list of Utterances to be converted to speech output.
An Utterance is a unit of input for Octave, and includes input text
, an optional description
to serve as the prompt for how the speech should be delivered, an optional voice
specification, and additional controls to guide delivery for speed
and trailing_silence
.
Controls how audio output is segmented in the response.
-
When enabled (
true
), input utterances are automatically split into natural-sounding speech segments. -
When disabled (
false
), the response maintains a strict one-to-one mapping between input utterances and output snippets.
This setting affects how the snippets
array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to false
, avoid including utterances with long text
, as this can result in distorted output.
If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk’s audio will be its own audio file, each with its own headers (if applicable).
Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on instant mode.
- Dynamic voice generation is not supported with this mode; a predefined voice must be specified in your request.
- This mode is only supported for streaming endpoints (e.g., /v0/tts/stream/json, /v0/tts/stream/file).
- Ensure only a single generation is requested (num_generations must be
1
or omitted). - With
instant_mode
enabled, requests incur a 10% higher cost due to increased compute and resource requirements.
Response
A unique ID associated with this request for tracking and troubleshooting. Use this ID when contacting support for troubleshooting assistance.