CCXML 1.0-W3C Development Guide Home  |  Frameset Home

  Dialog Extension: x-recordaudio  |  TOC  |  E: Client Side Scripting  

Dialog extension: "x-texttospeech"

The x-texttospeech dialog extension provides the ability to play a simple TTS string to the person on the line without having to invoke a fully fleshed out VXML dialog. There are a small number of parameters that allows the developer to customize the behavior of this dialog extension, which are:




An example to this dialog extension in action is listed below for convenience.

Note: You must escape reserved URI characters such as the & and # signs.


<?xml version="1.0" encoding="UTF-8" ?>
<ccxml version="1.0">

<meta name="author" content="Jeff Menkel"/>
<meta name="copyright" content="2007 Voxeo Corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

  <var name="initState" expr="'state_1'"/>
  <var name="MyCallID"/>

  <eventprocessor statevariable="initState">

    <transition event="connection.alerting" state="state_1">
      <assign name="MyCallID" expr="event$.connectionid"/>
      <send data="'MyEvent'" target="session.id"/>
    </transition>

    <transition event="MyEvent">
        <accept connectionid="MyCallID"/>
    </transition>

    <transition event="connection.connected" state="state_1">
      <log expr="'***** CALL WAS ANSWERED *****'"/>
      <dialogstart src="'null://?text=This is a test of the Text to Speech dialog extension&amp;termdigits=*'" type="'application/x-texttospeech'"/>
    </transition>


    <transition event="error.dialog.notstarted'" state="state_1">
        <log expr="'****** ERROR.DIALOGNOTSTARTED.NAME = ' + event$.name"/>
    </transition>


    <transition event="dialog.exit">
      <log expr="'***** CALL EXITING *****'"/>
      <log expr="'***** TERMINATING CHARACTER = ' + event$.values.termdigit"/>
      <exit/>
    </transition>

  </eventprocessor>
</ccxml>


To download the preceding code example, click texttospeech.zip.






  ANNOTATIONS: EXISTING POSTS
romilly1
6/10/2010 1:00 AM (EDT)
Just a question: how do you get this (x-texttospeech) extension to automatically exit the dialog after reading the text (without having the caller press any keys)?
voxeoJeffK
6/10/2010 1:41 AM (EDT)
Hello,

x-texttospeech does exit on its own upon completion. Did you maybe mean x-fetchdigits? If not, can you test with the Application Debugger running, and attach the log file where x-texttospeech does not exit?

Regards,
Jeff Kustermann
Voxeo Support
SSA_Whispir
12/19/2010 7:39 PM (EST)
Just wondering how you add a pause (i.e. break) between words in the 'text' parameter?
voxeoadam
12/20/2010 2:36 AM (EST)
Hello,

Currently, there are only three features for this particular dialog extention: voice, termdigits, and text.  If adding breaks is really a necessity, I'd suggest just using a normal VoiceXML dialog which plays a <prompt>.  This way you can manipulate the TTS however you like, without the restrictions that CCXML TTS has.
 
I've only found a way to pause or break for VXML however.  (see below)

[link=http://www.vxml.org/frame.jsp?page=break.htm]http://www.vxml.org/frame.jsp?page=break.htm[/link]

In the meantime, if there is any other questions that we can further help just feel free to let us know.

Regards
Adam Kong
Voxeo Support

[url=http://voxeo.com/prophecy]Download Prophecy 10[/url] | [url=http://docs.voxeo.com/prophecy/10.0/home.htm]Prophecy 10 Docs[/url]
voxeoadam
12/20/2010 3:24 AM (EST)
Hello,

I got one another way to add a pause in the text-to-speech: adding a inline pause with three dots as a pause, and hope this also can help you out. Following is one sample script:

[code]
<dialogstart src="'myfile.wav?termdigits=#&amp;text= Thanks for using our product, and we ... ... will provide best service to you!'"
type="'application/x-texttospeech'"
dialogid="myDialogid"
connectionid="call_id"
/>
[/code]

In the meantime, if there is any other questions that we can further help just feel free to let us know.

Regards
Adam Kong
Voxeo Support

[url=http://voxeo.com/prophecy]Download Prophecy 10[/url] | [url=http://docs.voxeo.com/prophecy/10.0/home.htm]Prophecy 10 Docs[/url]

login
  Dialog Extension: x-recordaudio  |  TOC  |  E: Client Side Scripting  

© 2012 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site