legacy:text-to-speech_guide:tts_http_protocol:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
text-to-speech_guide:tts_http_protocol:start [2015/03/02 22:16] – [Configuration] borjalegacy:text-to-speech_guide:tts_http_protocol:start [2017/07/31 16:17] (current) – ↷ Links adapted because of a move operation javier
Line 1: Line 1:
 ====== HTTP/TTS Protocol ====== ====== HTTP/TTS Protocol ======
  
-[[:vxi_installation_guide:start|Home]] >+[[vxi_installation_guide:start|Home]] >
  
 ===== 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 with the TTS engine treats your request. 
-  * The VoiceXML browser receives an audio file (cpataible with Asterisk) : it keep it in cache and play it.+  * The VoiceXML browser receives an audio file (compatible with the Asterisk audio formats) : it stores the file in cache and plays it
 +  * If you try to use the same content after, the VoiceXML will check and use the cache content instead of requesting the TTS engine.
  
  
-===== Configuration =====+===== VoiceXML Browser configuration =====
  
-The main TTS configuration is set in /etc/vxmld.conf.+The main TTS configuration is set in /etc/vxmld.conf, in the section "TTS server configuration", parameters prefix "client.prompt.resource.0."
  
-When you set the **method** with POST or GET the HTTP/TTS protocol is used to process <prompt> text contents. +  * **method** : 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). 
-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).+  * **uri** : You need to set the 'uri' for the TTS (or TextToVideo) service (our scripts install the services in http://ip/tts/provider/tts.php). 
 +  * **urivideo** : same as uri but when you sent the xml:language="video"
 +  * **format** : Configure the audio file 'format' used, all the scripts not support all the format. Have a look on the install documentation to check and set the correct format. 
 +  * **formatvideo** : same as format but when you sent the xml:language="video"
 +  * **maxage** : The parameter 'maxage' force to refresh the cache after sometime. The value 0, disable the caching, the HTTP request will be use for each prompt. The value -1 define infinite age. If the file exist in the cache, it will be always used from the cache directly. 
 +  * **checkBreak** : Allows to parse the prompt content (in SSML) an search for the <break> tag. The <break> tags are processed by the VoiceXML browser to make pauses in the prompt. 
 +  * **cutPrompt** : The option 'cutPrompt', allows to slice the prompt in order to mutualize the maximal contents (cuts in '.', ',', ':' ...). 
 +  * **ssml** : The option 'ssml' for to send the text as a SSML/XML well formated content (with <?xml> and <ssml> roots tags). 
  
-You need to set the **url** for the TTS (or TextToVideo) service (our scripts install the services in http://ip/tts/provider/tts.php). 
  
-Configure the audio file **format** used, all the scripts not support all the format. Have a look on the install documentation to check and set the correct format. +Configuration example :
- +
-The parameter **maxage** force to refresh the cache after sometime. The value 0, disable the caching, the HTTP request will be use for each prompt. The value -1 define infinite age. If the file exist in the cache, it will be always used from the cache directly. +
- +
-The option **cutPrompt**, allows to slice the prompt in order to mutualize the maximal content (cuts in '.', ',', ':' ...). +
- +
-The option **ssml** for to send the content as SSML/XML well formatted content (with <?xml> and <ssml> roots tags). +
  
 <code> <code>
Line 46: Line 52:
 #client.prompt.resource.0.password           VXIString   demo #client.prompt.resource.0.password           VXIString   demo
 client.prompt.resource.0.ssml               VXIInteger  0 client.prompt.resource.0.ssml               VXIInteger  0
 +</code>
 +
 +Most of this parameters can be change from the VoiceXML syntax using properties. Use the property name 'prompt' added with the parameter name.
 +
 +VoiceXML example :
 +
 +<code>
 +<property name="promptvoice" value="Poala"/>
 </code> </code>
 ===== HTTP Parameters ==== ===== HTTP Parameters ====
  
-  * text : the text to synthesize : from the <prompt> content (UTF8 format). +  * **text** : the text to synthesize : from the <prompt> content (UTF8 format). 
-  * language : the language used (en-GB, fr-FR...) : from the xml:lang attribut. +  * **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. +  * **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. +  * **voice** : the voice (Carla, Marcos... depends on the TTS provider) : from the xml:lang attribut (3th parameter ex: "it-IT-Paola")
-  * size* : the size of the image : from the property promptsize. +  * **size*** : the size of the image : from the property promptsize. 
-  * backgroud* : the image reference or color used for the background : from the property promptbackground. +  * **backgroud*** : the image reference or color used for the background : from the property promptbackground. 
-  * color* : the color for the text : from the property promptcolor. +  * **color*** : the color for the text : from the property promptcolor. 
-  * font* : the size of the font : from the property promptfont. +  * **font*** : the size of the font : from the property promptfont. 
-  * offset* : the offset X shift to the text : from the property promptoffset +  * **offset*** : the offset X shift to the text : from the property promptoffset 
-  * position* : the position Y shift to the text : from the property promptposition +  * **position*** : the position Y shift to the text : from the property promptposition 
-  * hmac : MD5 key generated for Voxygen Cloud integration.+  * **hmac** : MD5 key generated for Voxygen Cloud integration
 + 
 +* : Only for TextToVideo function. When you set xml:language="video".
  • legacy/text-to-speech_guide/tts_http_protocol/start.1425334619.txt.gz
  • Last modified: 2017/07/28 22:29
  • (external edit)