v1

latestOpenAPI 3.0.02026-07-26152942.8 KB
text_to_speech

Convert text to speech with streaming response

Convert text to speech using the specified voice with streaming response. Returns binary audio stream.

post/v1/text-to-speech/{voice_id}/stream

Path parameters

voice_idstring required

Request body

textstring required

The text to convert to speech

language'en' | 'ko' | 'ja' | 'bg' | 'cs' | 'da' | 'el' | 'es' | 'et' | 'fi' | 'hu' | 'it' | 'nl' | 'pl' | 'pt' | 'ro' | 'ar' | 'de' | 'fr' | 'hi' | 'id' | 'ru' | 'vi' | 'hr' | 'lt' | 'lv' | 'sk' | 'sl' | 'sv' | 'tr' | 'uk' required

The language code of the text

stylestring

The style of character to use for the text-to-speech conversion

model'sona_speech_1' | 'sona_speech_2' | 'sona_speech_2_flash' | 'supertonic_api_1' | 'supertonic_api_3'

The model type to use for the text-to-speech conversion

output_format'wav' | 'mp3'

The desired output format of the audio file (wav, mp3). Default is wav.

include_phonemesboolean

Return phoneme timing data with the audio

normalized_textstring

Pre-normalized text for TTS. Only used with sona_speech_2 and sona_speech_2_flash models.

Response

Streaming audio data in binary format or NDJSON format with phoneme data based on includePhonemes parameter