Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
text-to-speech_guide:tts_http_protocol:start [2015/03/02 21:59] – borja | text-to-speech_guide:tts_http_protocol:start [2017/07/28 23:18] – ↷ Page moved from legacy:text-to-speech_guide:tts_http_protocol:start to text-to-speech_guide:tts_http_protocol:start javier | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Description ===== | ===== Description ===== | ||
+ | |||
+ | The VoiceXML browser can connect to a TTS engine using HTTP. | ||
+ | The HTTP protocol is used to transform the prompt text to an audio file. | ||
+ | The audio file can be store in a cache directory in order to optimize the TTS ressources using. | ||
+ | The first access request to generate the audio file, and save it into the cache. The next times, if you use the __same__ text content, the VoiceXML browser will directly use the file in cache, as a prerecorded audio. | ||
This protocol is simple : | 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...). | * 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 web server |
- | * The VoiceXML browser receives an audio file (cpataible | + | * The VoiceXML browser receives an audio file (compatible |
+ | * If you try to use the same content after, the VoiceXML will check and use the cache content instead of requesting the TTS engine. | ||
+ | |||
+ | |||
+ | ===== VoiceXML Browser configuration ===== | ||
+ | |||
+ | The main TTS configuration is set in / | ||
+ | |||
+ | * **method** : When you set the ' | ||
+ | * **uri** : You need to set the ' | ||
+ | * **urivideo** : same as uri but when you sent the xml: | ||
+ | * **format** : Configure the audio file ' | ||
+ | * **formatvideo** : same as format but when you sent the xml: | ||
+ | * **maxage** : The parameter ' | ||
+ | * **checkBreak** : Allows to parse the prompt content (in SSML) an search for the < | ||
+ | * **cutPrompt** : The option ' | ||
+ | * **ssml** : The option ' | ||
+ | |||
+ | |||
+ | Configuration example : | ||
+ | |||
+ | < | ||
+ | ############################ | ||
+ | # TTS server configuration # | ||
+ | ############################ | ||
+ | |||
+ | # | ||
+ | # | ||
+ | client.prompt.resource.0.method | ||
+ | client.prompt.resource.0.cacheDir | ||
+ | client.prompt.resource.0.format | ||
+ | client.prompt.resource.0.formatVideo | ||
+ | client.prompt.resource.0.maxage | ||
+ | client.prompt.resource.0.checkBreak | ||
+ | client.prompt.resource.0.cutPrompt | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | client.prompt.resource.0.ssml | ||
+ | </ | ||
+ | |||
+ | Most of this parameters can be change from the VoiceXML syntax using properties. Use the property name ' | ||
+ | |||
+ | VoiceXML example : | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | ===== HTTP Parameters ==== | ||
- | ===== Parameters ==== | + | * **text** : the text to synthesize : from the < |
+ | * **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 (3th parameter ex: " | ||
+ | * **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. | ||
- | | + | * : Only for TextToVideo function. When you set xml:language=" |
- | * language | + | |
- | * 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. | + |