Skip to main content

Category:TTS

About

Text-To-Speech Information

Freeswitch currently supports several TTS options.

Click here to expand Table of Contents

Javascript Implementation

Javascript_Session_Speak

Via mod_shout using online TTS

Using mod_shout allows you to stream audio from an URL, this allows you to utilize high quality online TTS services by writing out custom GET requests. Obviously since an Internet transfer occurs on each TTS transaction this approach might not me desired on a production environment.

Bing Translate

Register for an API Key (appid) Here and replace the 'YOUR-KEY-HERE' in the GET url below. For more information, see Here.

http://api.microsofttranslator.com/V2/Http.svc/Speak?language=en&format=audio/mp3&options=MaxQuality&appid=YOUR-KEY-HERE&text=Text+to+say

IVR Example

<include>
<!-- demo IVR, Main Menu -->
<!-- Other "flite" voices slt (female voice - best), rms (male voice), awb (male voice), kal (male voice) -->
<menu name="ivr_danols_after_hours"
tts-engine="flite" tts-voice="slt"
max-failures="3" max-timeouts="3"
confirm-macro="" confirm-key="" confirm-attempts="3"
timeout="10000" inter-digit-timeout="2000"
digit-len="1"
<!-- say using online TTS -->
greet-long="shout://api.microsofttranslator.com/V2/Http.svc/Speak?language=en&format=audio/mp3&options=MaxQuality&appid=YOUR-KEY-HERE&text=Thank+you+for+calling+Danols."
<!-- or say using built in flite -->
greet-short="say:Thank+you+for+calling+Danols."
invalid-sound="say:Invalid selection"
exit-sound="say:Goodby and thank you for calling Danols.">

<!-- The following are the definitions for the digits the user dials -->
<entry action="menu-exec-app" digits="1" param="transfer 1000 XML default"/>
</menu>
</include>

Google Translate

You probably need to agree with Google API TOS, located at..? Please note google will fail to convert if the input text is to long so test url in browser first; Bing appears to be more lenient in this regard.

<extension name="Free_Google_Text_To_Speech">
<condition field="destination_number" expression="^2115$">
<action application="answer" data=""/>
<action application="playback" data="shout://translate.google.com/translate_tts?tl=en&q=Buy+Cheap+dids+at+www+dot+voice+network+dot+see+eh"/>
</condition>
</extension>

Pages in category "TTS"

The following 7 pages are in this category, out of 7 total.

Mmod_dptools: answermod_dptools: speakMod cepstralM cont.Mod fliteMod tts commandlineMod unimrcpTTTS