Voice Gateway

Text-to-Speech

TTS: Convert text to lifelike speech.


Request API Key Find out more

Voice API : Text-to-Speech

The Text-to-Speech service allows an application to have a text-to-speech (TTS) conversion performed on a long or short text and for the resulting voice stream to be delivered via a number of different channels:


  • Playback during a SIP call
  • Voice messaging - delivery via voice call
  • Link in an SMS text message
  • Link or attachment in an email
  • HTTPS retrieval using REST-compliant Voice API call
  • HTTPS callback with file attached (POST)
  • HTTPS callback including URL of file for retrieval

The Text-to-Speech service is one of many building blocks that will be released as part of the Voice API over the coming months.



Convert text to speech using Voice Gateway Text-to-Speech service with RESTful Voice API
Example using cURL

Submit conversion request

Request:

curl --request POST https://api.melroselabs.com/voice/texttospeech/ --header 'Content-Type: application/json' --header 'x-api-key: [API_KEY]' -d '{"voiceText": "Welcome Allan. The event for today will begin at 9.30am in room H32.", "voice": "Emma"}'

Response:

{"transactionID": "1ccead78-6550-4aac-a6b4-a4942b908659"}

Retrieve resulting speech

Request:

curl --request GET "https://api.melroselabs.com/voice/texttospeech/1ccead78-6550-4aac-a6b4-a4942b908659" --header 'x-api-key: [API_KEY]'

Response:

MP3 file

Using Email to Access Text-to-Speech

Email can be used to easily and quickly perform a text-to-speech (TTS) conversion as an alternative to using REST HTTPS calls to the Voice API. Send an email to the Text-to-Speech service at voice@api.melroselabs.com and use the subject field to contain the text you wish converted. After a number of seconds, you will receive an email back from the service with an MP3 file containing the converted speech.

Various voices and corresponding languages are available using email addresses specifc to each voice. The format of each email address is voice.language.voice@api.melroselabs.com and the options for voice and language are shown below.

The following languages and voices are available using the Text-to-Speech service of the Voice API:

Language Voice Sample Email (example)
Arabic (arb)Zeina (f) zeina.arb.voice@api.melroselabs.com
Chinese, Mandarin (cmn-CN)Zhiyu (f) zhiyu.cmn-cn.voice@api.melroselabs.com
Danish (da-dk)Mads (m)
Naja (f)
mads.da-dk.voice@api.melroselabs.com
Dutch (nl-nl)Lotte (f)
Ruben (m)
lotte.nl-nl.voice@api.melroselabs.com
English, Australian (en-AU)Russell (m)
Nicole (f)
russell.en-au.voice@api.melroselabs.com
English (en-GB)Emma (f)
Amy (f)
Brian (m)
emma.en-gb.voice@api.melroselabs.com
English, Indian (en-IN)Aditi (f)
Raveena (f)
aditi.en-in.voice@api.melroselabs.com
English (en-US)Salli (f)¹
Ivy (f)
Joanna (f)
Kendra (f)
Kimberly (f)
Joey (m)
Justin (m)
Matthew (m)
salli.en-us.voice@api.melroselabs.com
English, Welsh (en-GB-WLS)Geraint (m) geraint.en-gb-wls.voice@api.melroselabs.com
French (fr-FR)Céline/Celine (f)
Léa/Lea (f)
Mathieu (m)
celine.fr-fr.voice@api.melroselabs.com
French, Canadian (fr-CA)Chantal (f) chantal.fr-ca.voice@api.melroselabs.com
Germany (de-DE)Vicki (f)
Marlene (f)
Hans (m)
vicki.de-de.voice@api.melroselabs.com
Hindi (hi-IN)Aditi (f) aditi.hi-in.voice@api.melroselabs.com
Icelandic (is-IS)Karl (m)
Dóra/Dora (f)
karl.is-is.voice@api.melroselabs.com
Italian (it-IT)Bianca (f)
Carla (f)
Giorgio (m)
bianca.it-it.voice@api.melroselabs.com
Japanese (ja-JP)Mizuki (f)
Takumi (m)
mizuki.ja-jp.voice@api.melroselabs.com
Korean (ko-KR)Seoyeon (f) seoyeon.ko-kr.voice@api.melroselabs.com
Norwegian (nb-NO)Liv (f) liv.nb-no.voice@api.melroselabs.com
Polish (pl-PL)Jan (m)
Ewa (f)
Maja (f)
Jacek (m)
jan.pl-pl.voice@api.melroselabs.com
Portuguese (pt-BR)Vitória/Vitoria (f)
Ricardo (m)
vitoria.pt-br.voice@api.melroselabs.com
Portuguese (pt-PT)Cristiano (m)
Inês/Ines (f)
cristiano.pt-pt.voice@api.melroselabs.com
Romanian (ro-RO)Carmen (f) carmen.ro-ro.voice@api.melroselabs.com
Russian (ru-RU)Tatyana (f)
Maxim (m)
tatyana.ru-ru.voice@api.melroselabs.com
Spanish (es-ES)Enrique (m)
Lucia (f)
Conchita (f)
enrique.es-es.voice@api.melroselabs.com
Spanish (es-MX)Mia (f) mia.es-mx.voice@api.melroselabs.com
Spanish (es-US)Penélope/Penelope (f)
Miguel (m)
penelope.es-us.voice@api.melroselabs.com
Swedish (sv-SE)Astrid (f) astrid.sv-se.voice@api.melroselabs.com
Turkish (tr-TR)Filiz (f) filiz.tr-tr.voice@api.melroselabs.com
Welsh (cy-GB)Gwyneth (f) gwyneth.cy-gb.voice@api.melroselabs.com

¹ Default voice. Used for voice@api.melroselabs.com or when no voice is specified during a Voice API REST call.



Service snapshot

  • Lifelike voices
  • Asyncronous RESTful API
  • Large selection of voices
  • Muli-language support

Find out more about this service...

Please provide your first name.
Please provide your last name.
Please provide a valid company name.
Please provide a valid email address.