Voice Gateway

Text-to-Speech

TTS: Convert text to lifelike speech.


Service Docs

Voice Gateway : Text-to-Speech

People like talking and listening to other people. With Text-to-Speech you can synthesise human speech and make interaction with an automated system more natural. Automating interaction with a system, which becomes desirable when it's more natural, allows you to make the system more scalable and cost-effective.


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


  • Returned during RESTful Voice API call (synchronous)
  • HTTPS retrieval using RESTful Voice API call (asynchronous)
  • Attachment in an email or HTTPS callback (POST)
  • URL link in an email, SMS or HTTPS callback
  • Playback during a SIP call
  • Voice messaging - delivery via voice call

Text-to-Speech is a cloud service that quickly converts text into high quality lifelike speech. You can use Text-to-Speech to develop applications that increase engagement and accessibility. Text-to-Speech supports multiple languages and includes a variety of lifelike voices, so you can build speech-enabled applications that work in multiple geographic locations and use the ideal voice for your customers.


Text-to-Speech Conversion Timings

The following timings were performed using synchronous API calls with cURL and an extract from Alice in Wonderland by Lewis Carol.

Number of words:15 words57 words112 words253 words
Total TTS Duration (seconds):0.5360.7150.9401.420

The Text-to-Speech service is one of the many building blocks we are releasing over the coming months as part of the Voice Gateway, and making available through the Voice API.


Need to convert speech-to-text? See our Speech-to-Text service.

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.

Using Email to Access Text-to-Speech Service

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.

An API key is currently not required when using email.


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

Submit conversion request and receive resulting speech

Request:

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

Response:

MP3 file

Submit conversion request

Request:

curl -X POST https://api.melroselabs.com/voice/texttospeech/ \
    -H 'Content-Type: application/json' \
    -H '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 -X GET "https://api.melroselabs.com/voice/texttospeech/1ccead78-6550-4aac-a6b4-a4942b908659" \
    -H 'x-api-key: [API_KEY]'

Response:

MP3 file

Service snapshot

  • Lifelike voices
  • Asyncronous and syncronous RESTful API
  • Large selection of voices
  • Multi-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.
Please type your message.