Skip to main content

TTS Text Object

This section outlines the TTS Text object.

TTS Text Object Attributes

The fields listed in the table below will be returned in a JSON object when a successful request has been made.

AttributeData TypeDescription
bitratestringThe bitrate used for text-to-speech conversion, specified in bits per second. Values accepted in this field are: 8000, 16000, 24000, 32000, 40000, 48000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, and 320000. Please note that not all the formats support all the bitrate values. Refer to the section below for more information on this. The default value is 16000.
formatstringThe output audio format used for text-to-speech conversion. Values accepted in this field are: al, flac, g722, mp3, mp4, ogg, ul, and wav. Please note that not all the formats support all the bitrate values. Refer to the section below for more information on this. The default value is mp3.
languagestringThe language used for text-to-speech conversion. Values accepted in this field are: arb, cmn-CN, cy-GB, da-DK, de-DE, en-AU, en-GB, en-GB-WLS, en-IN, en-US, es-ES, es-MX, es-US, fr-CA, fr-FR, is-IS, it-IT, ja-JP, hi-IN, ko-KR, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sv-SE, and tr-TR. Not all languages might be supported for the selected voice. Refer to the table below for the complete list of the voices with their languages. The default value is en-US.
textstringThe text that will be converted into audio with the text-to-speech feature. The maximum number of character allowed for the text is 3000.
voice_sidstringThe secure ID of the voice used for text-to-speech conversion. Values accepted in this field are: man, woman, or any of the Amazon Polly voices listed in the table below. The default value is man.

Sample TTS Text Object

{
"bitrate": "32000",
"format": "mp3",
"language": "en-US",
"text": "This is my text for text-to-speech audio.",
"voice_sid": "Polly.Kimberly"
}
note

If you set a language without specifying a voice, the system will automatically set a voice supporting the selected language for you.

Known Formats Limitations

When you create a voice message, please bear in mind that some of the formats have certain limitations:

  • The AL, FLAC, G722, UL, and WAV formats ignore the bitrate parameter.
  • The MP3 format supports only bitrates up to 160 kbit/s (the bitrate value of 160000). Passing any value higher than that will result in 160 kbit/s MP3 audio file anyway.
  • The MP4 format supports only bitrates up to 80 kbit/s (the bitrate value of 80000). Passing any value higher than that will result in 80 kbit/s MP4 audio file anyway.
  • The OGG format supports only bitrates from 16 kbit/s up to 64 kbit/s (the bitrate value from 16000 to 64000). This is due to the FFmpeg codec limitation used to create audio files in the OGG format.

Amazon Polly Voices

tip

By default, Amazon Polly voices might be disabled for your account. Contact our support team at support@carrierx.com to enable them.

CarrierX allows its partners to use Amazon Polly voices for their text-to-speech messages conversion. Amazon Polly is a service that turns text into lifelike speech. Polly's text-to-speech service uses advanced deep learning technologies to synthesize natural sounding human speech. It contains dozens of lifelike voices across a broad set of languages.

info

Please note that using any of the Amazon Polly voices from the table below will incur additional charges on your account.

LanguageLanguage CodeGenderVoice
ArabicarbFemalePolly.Zeina
Chinese, Mandarincmn-CNFemalePolly.Zhiyu
Danishda-DKMalePolly.Mads
Danishda-DKFemalePolly.Naja
Dutchnl-NLFemalePolly.Lotte
Dutchnl-NLMalePolly.Ruben
English-Australianen-AUFemalePolly.Nicole
English-Australianen-AUFemalePolly.Olivia
English-Australianen-AUMalePolly.Russell
English-Britishen-GBFemalePolly.Amy
English-Britishen-GBMalePolly.Brian
English-Britishen-GBFemalePolly.Emma
English-Indianen-INFemalePolly.Aditi
English-Indianen-INFemalePolly.Raveena
English-USen-USFemalePolly.Ivy
English-USen-USFemalePolly.Joanna
English-USen-USMalePolly.Joey
English-USen-USMalePolly.Justin
English-USen-USFemalePolly.Kendra
English-USen-USMalePolly.Kevin
English-USen-USFemalePolly.Kimberly
English-USen-USMalePolly.Matthew
English-USen-USFemalePolly.Salli
English-Welshen-GB-WLSMalePolly.Geraint
Frenchfr-FRFemalePolly.Celine
Frenchfr-FRFemalePolly.Lea
Frenchfr-FRMalePolly.Mathieu
French-Canadianfr-CAFemalePolly.Chantal
Germande-DEMalePolly.Hans
Germande-DEFemalePolly.Marlene
Germande-DEFemalePolly.Vicki
Hindihi-INFemalePolly.Aditi
Icelandicis-ISFemalePolly.Dora
Icelandicis-ISMalePolly.Karl
Italianit-ITFemalePolly.Bianca
Italianit-ITFemalePolly.Carla
Italianit-ITMalePolly.Giorgio
Japaneseja-JPFemalePolly.Mizuki
Japaneseja-JPMalePolly.Takumi
Koreanko-KRFemalePolly.Seoyeon
Norwegiannb-NOFemalePolly.Liv
Polishpl-PLFemalePolly.Ewa
Polishpl-PLMalePolly.Jacek
Polishpl-PLMalePolly.Jan
Polishpl-PLFemalePolly.Maja
Portuguese-Brazilianpt-BRFemalePolly.Camila
Portuguese-Brazilianpt-BRMalePolly.Ricardo
Portuguese-Brazilianpt-BRFemalePolly.Vitoria
Portuguese-Europeanpt-PTMalePolly.Cristiano
Portuguese-Europeanpt-PTFemalePolly.Ines
Romanianro-ROFemalePolly.Carmen
Russianru-RUMalePolly.Maxim
Russianru-RUFemalePolly.Tatyana
Spanish-Castilianes-ESFemalePolly.Conchita
Spanish-Castilianes-ESMalePolly.Enrique
Spanish-Castilianes-ESFemalePolly.Lucia
Spanish-Mexicanes-MXFemalePolly.Mia
US Spanishes-USFemalePolly.Lupe
US Spanishes-USMalePolly.Miguel
US Spanishes-USFemalePolly.Penelope
Swedishsv-SEFemalePolly.Astrid
Turkishtr-TRFemalePolly.Filiz
Welshcy-GBFemalePolly.Gwyneth