This is an old revision of the document!
HTTP/TTS Protocol
Home >
Description
This protocol is simple :
- From the VoiceXML browser, you configure to use HTTP, a (POST recommended) request containing mainly the text content and additional parameters (like language, voice…).
- The server treats your request.
- The VoiceXML browser receives an audio file (cpataible with Asterisk) : it keep it in cache and play it.
Configuration
The main TTS configuration is set in /etc/vxmld.conf.
When you set the method with POST or GET the HTTP/TTS protocol is used to process <prompt> text contents. If you set the value ASTERISK, the VoiceXML browser will send the content to the Asterisk module (as a text/UTF8 or XML/UTF8 content).
############################ # TTS server configuration # ############################ #client.prompt.resource.0.uri VXIString http://localhost/tts/flite/tts.php #client.prompt.resource.0.uriVideo VXIString http://localhost/tts/video/ttv.php client.prompt.resource.0.method VXIString POST client.prompt.resource.0.cacheDir VXIString /tmp/cacheContent client.prompt.resource.0.format VXIString wav client.prompt.resource.0.formatVideo VXIString 3gp client.prompt.resource.0.maxage VXIInteger -1 client.prompt.resource.0.checkBreak VXIInteger 0 client.prompt.resource.0.cutPrompt VXIInteger 0 #client.prompt.resource.0.api VXIString voxygen #client.prompt.resource.0.user VXIString demo #client.prompt.resource.0.password VXIString demo client.prompt.resource.0.ssml VXIInteger 0
HTTP Parameters
- text : the text to synthesize : from the <prompt> content (UTF8 format).
- language : the language used (en-GB, fr-FR…) : from the xml:lang attribut.
- format : the audio format to return (wav, gsm, mp4… formats supported by Asterisk) : from the configuration.
- voice : the voice (Carla, Marcos… depends on the TTS provider) : from the xml:lang attribut.
- size* : the size of the image : from the property promptsize.
- backgroud* : the image reference or color used for the background : from the property promptbackground.
- color* : the color for the text : from the property promptcolor.
- font* : the size of the font : from the property promptfont.
- offset* : the offset X shift to the text : from the property promptoffset
- position* : the position Y shift to the text : from the property promptposition
- hmac : MD5 key generated for Voxygen Cloud integration.