Aculab Cloud supports Polly and Cepstral Text To Speech (TTS) engines.
- Selecting a voice in the REST API
- Selecting a voice in the UAS API
- Using a Polly voice
- Using a Cepstral voice
- Reserved characters
- Text length
- Common SSML tags
Selecting a voice in the REST API
In the REST API Play action, the text_to_say property supports Speech Synthesis Markup Language (SSML) allowing you to change the way your text is spoken. However, this cannot be used to select the voice used by TTS to say your text. This defaults to the voice configured in your service. You can choose a different voice by setting tts_voice to a Selector from the voice tables below. For example, to set English US Female Polly Kimberly use the following setting for tts_voice:
"tts_voice" : "English US Female Polly Kimberly"
Selecting a voice in the UAS API
In the UAS API, the Say methods support Speech Synthesis Markup Language (SSML) allowing you to change the way your text is spoken, for example, by choosing which voice you'd like to use using the voice tag. You can also choose the TTS engine to use, via the optional acu-engine tag which, if provided, must be outermost in the string. If you don't provide these tags your account's Default TTS voice will be used. For example, to set English US Female Polly Kimberly use the following SSML:
channel.FilePlayer.Say("<acu-engine name='Polly'><voice name='Kimberly'>I have something to say.</voice></acu-engine>");
Using a Polly voice
Polly's website has a demo which allows you to select a voice and immediately hear how different text will sound - see Polly demos.
Polly TTS supports a subset of SSML, which can optionally be embedded within the text you supply to the say function. For a summary of the SSML tags which may be used, see Common SSML tags below. For more detailed information, to go W3C SSML 1.1 recommendation.
We support the following Polly voices:
Using a Cepstral voice
Cepstral's website has a demo which allows you to select a voice and immediately hear how different text will sound - see Cepstral demos.
Cepstral TTS supports a subset of the Speech Synthesis Markup Language (SSML), which can optionally be embedded within the text you supply to the say function. For a summary of the SSML tags which may be used, see Common SSML tags below. For more detailed information, go to Cepstral SSML FAQ and scroll down to the 'Common Usage Examples'. With reference to that page, please bear in mind the following:
We support the following Cepstral voices:
|Callie-8kHz (default)||English US Female Cepstral Callie|
|Marta-8kHz||Spanish US Female Cepstral Marta|
|Vittoria||Italian Italy Female Cepstral Vittoria|
We don't support:
- Inserting recorded audio files (our APIs' play functions already allow file replay)
- Applying Cepstral special effects
- Inserting bookmarks
Some characters are reserved so, if the text you need to say contains any of these, replace them as shown:
|Reserved Character||Replace With|
For example, "Bill & Ben played in the garden" would be become "Bill & Ben played in the garden".
The maximum length of the text to be converted is 1500 characters. As the length of the text is increased the generation time for the associated audio will also increase and, if is not a repeated phrase (and therefore may be cached) there will be a longer delay before the audio is played.
Common SSML tags
Polly and Cepstral both support a subset of SSML. Details of common tags can be found below. It is highly recommended that you test your application before deploying with a different TTS engine.
Inserts a break or pause in the speech.
Optional arguments are time and strength.
time sets an absolute value for the pause. For example <break time="3s"> and <break time="3ms"> set the break time to be three seconds and three milliseconds respectively. The length of a break may be up to 10 seconds in duration
strength sets the relative value of the pause. These are none, x-weak, weak, medium, strong and x-strong.
This is a <break /> sentence break. This is a <break time="2s"/> two second break. This is a dramatic <break strength="x-strong"/> break.
Allows the user to change the voice used. Parameter name is required, specifying the voice to use. The supported voices for each TTS are listed above.
This SSML features is supported in the UAS API only. For the REST API please use the tts_voice setting.
<acu-engine name='Polly'><voice name='Amy'>I'm using Amy instead of the default voice.</voice></acu-engine>
Allows the user to change the pitch, speed and volume of a segment of speech.
Common optional parameters are: pitch, rate and volume.
pitch can be used to set the pitch of speech. Options are: x-low, low, medium, high, x-high,a relative change (measured in Hz) e.g. +50Hz, or a percentage change e.g +50%.
rate sets the rate of speech. Options are: x-slow, slow, medium, fast and x-fast,a relative change (measured in Hz) e.g. +50Hz, or a percentage change e.g +50%.
volume sets the volume for speech. Options are: silent, x-soft, soft, medium, loud and x-loud, a relative change (measured in Hz) e.g. +50Hz, or a percentage change e.g +50%.
<prosody rate="x-fast">I'm using a very fast rate.</prosody> This is normal volume. <prosody volume="soft">This is a soft volume.</prosody> I can talk very <prosody rate="slow" pitch="low">deeply and slowly.</prosody> Today's date is the <prosody rate="-50%">15th April, 2012.</prosody>
Can be used to read with empasis.
Required parameter: level. Options are: reduced, moderate and strong.
This is a <emphasis level="strong">level of emphasis</emphasis>, which can be used to highlight important information.
On a developer cloud account you can start using TTS straight away. You have up to 1000 free minutes of platform time per month on which to use it.
For other accounts, our TTS is charged per conversion, per minute with 15 second granularity. So, for example:
- A play action that plays for 12 seconds will be charged for 15 seconds.
- A get input action that plays a prompt of 5 seconds and then plays "I'm sorry I didn't catch what you said" which lasts 6 seconds and the 5 second prompt again will be charged for 30 seconds (5+6+5=16, rounded up to 2 periods of 15 seconds).
You can obtain detailed charge information for a specific call using the Application Status web service. You can obtain detailed charge information for calls over a period of time using the Managing Reports web services.