text_to_speech

Predict text-to-speech duration

Predict the duration of text-to-speech conversion without generating audio

post/v1/predict-duration/{voice_id}

Path parameters

voice_idstring required

Request body

textstring required

The text to convert to speech. Max length is 300 characters.

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

Language code of the voice

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.

Response

Returns predicted duration of the audio in seconds

durationnumber

Changes

No recorded changes to this endpoint across all 1 revision of this API.