v4
OpenAPI 3.1.02026-07-313621,3961.8 MBText To Dialogue Streaming With Timestamps
Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps
Query parameters
Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.
When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers.
Headers
Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.
Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.
Request body
Example request
{
"inputs": [
{
"text": "Hello, how are you?",
"voice_id": "bYTqZQo3Jz7LQtmGTgwi"
},
{
"text": "I'm doing well, thank you!",
"voice_id": "6lCwbsX1yVjD49QmpkTR"
}
],
"settings": {
"stability": 0.5
},
"pronunciation_dictionary_locators": [
{
"pronunciation_dictionary_id": "test",
"version_id": "id2"
}
],
"seed": 12345
}Response
Stream of transcription chunks
Example response
{
"alignment": {
"character_end_times_seconds": [
0.1,
0.2
],
"character_start_times_seconds": [
0,
0.1
],
"characters": [
"H",
"e"
]
},
"audio_base64": "base64_encoded_audio_chunk",
"normalized_alignment": {
"character_end_times_seconds": [
0.1,
0.2
],
"character_start_times_seconds": [
0,
0.1
],
"characters": [
"H",
"e"
]
},
"voice_segments": [
{
"character_end_index": 2,
"character_start_index": 0,
"dialogue_input_index": 0,
"end_time_seconds": 0.2,
"start_time_seconds": 0,
"voice_id": "VEDscrYI8uIMttlO2Ztu"
}
]
}