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.
Attribute | Data Type | Description |
---|---|---|
bitrate | string | The 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 . |
format | string | The 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 . |
language | string | The 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 . |
text | string | The 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_sid | string | The 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"
}
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 of160000
). 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 of80000
). 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 from16000
to64000
). This is due to the FFmpeg codec limitation used to create audio files in the OGG format.
Amazon Polly Voices
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.
Please note that using any of the Amazon Polly voices from the table below will incur additional charges on your account.
Language | Language Code | Gender | Voice |
---|---|---|---|
Arabic | arb | Female | Polly.Zeina |
Chinese, Mandarin | cmn-CN | Female | Polly.Zhiyu |
Danish | da-DK | Male | Polly.Mads |
Danish | da-DK | Female | Polly.Naja |
Dutch | nl-NL | Female | Polly.Lotte |
Dutch | nl-NL | Male | Polly.Ruben |
English-Australian | en-AU | Female | Polly.Nicole |
English-Australian | en-AU | Female | Polly.Olivia |
English-Australian | en-AU | Male | Polly.Russell |
English-British | en-GB | Female | Polly.Amy |
English-British | en-GB | Male | Polly.Brian |
English-British | en-GB | Female | Polly.Emma |
English-Indian | en-IN | Female | Polly.Aditi |
English-Indian | en-IN | Female | Polly.Raveena |
English-US | en-US | Female | Polly.Ivy |
English-US | en-US | Female | Polly.Joanna |
English-US | en-US | Male | Polly.Joey |
English-US | en-US | Male | Polly.Justin |
English-US | en-US | Female | Polly.Kendra |
English-US | en-US | Male | Polly.Kevin |
English-US | en-US | Female | Polly.Kimberly |
English-US | en-US | Male | Polly.Matthew |
English-US | en-US | Female | Polly.Salli |
English-Welsh | en-GB-WLS | Male | Polly.Geraint |
French | fr-FR | Female | Polly.Celine |
French | fr-FR | Female | Polly.Lea |
French | fr-FR | Male | Polly.Mathieu |
French-Canadian | fr-CA | Female | Polly.Chantal |
German | de-DE | Male | Polly.Hans |
German | de-DE | Female | Polly.Marlene |
German | de-DE | Female | Polly.Vicki |
Hindi | hi-IN | Female | Polly.Aditi |
Icelandic | is-IS | Female | Polly.Dora |
Icelandic | is-IS | Male | Polly.Karl |
Italian | it-IT | Female | Polly.Bianca |
Italian | it-IT | Female | Polly.Carla |
Italian | it-IT | Male | Polly.Giorgio |
Japanese | ja-JP | Female | Polly.Mizuki |
Japanese | ja-JP | Male | Polly.Takumi |
Korean | ko-KR | Female | Polly.Seoyeon |
Norwegian | nb-NO | Female | Polly.Liv |
Polish | pl-PL | Female | Polly.Ewa |
Polish | pl-PL | Male | Polly.Jacek |
Polish | pl-PL | Male | Polly.Jan |
Polish | pl-PL | Female | Polly.Maja |
Portuguese-Brazilian | pt-BR | Female | Polly.Camila |
Portuguese-Brazilian | pt-BR | Male | Polly.Ricardo |
Portuguese-Brazilian | pt-BR | Female | Polly.Vitoria |
Portuguese-European | pt-PT | Male | Polly.Cristiano |
Portuguese-European | pt-PT | Female | Polly.Ines |
Romanian | ro-RO | Female | Polly.Carmen |
Russian | ru-RU | Male | Polly.Maxim |
Russian | ru-RU | Female | Polly.Tatyana |
Spanish-Castilian | es-ES | Female | Polly.Conchita |
Spanish-Castilian | es-ES | Male | Polly.Enrique |
Spanish-Castilian | es-ES | Female | Polly.Lucia |
Spanish-Mexican | es-MX | Female | Polly.Mia |
US Spanish | es-US | Female | Polly.Lupe |
US Spanish | es-US | Male | Polly.Miguel |
US Spanish | es-US | Female | Polly.Penelope |
Swedish | sv-SE | Female | Polly.Astrid |
Turkish | tr-TR | Female | Polly.Filiz |
Welsh | cy-GB | Female | Polly.Gwyneth |