CallXML 2.0 Development Guide Home  |  Frameset Home

This documentation is for CallXML 2, which has been superceded by CallXML 3. The CallXML 2 language is not being updated any longer. CallXML 3, however, has many new features and is actively being enhanced. If you're writing a new CallXML application, you should use CallXML 3. Click here for the CallXML 3.0 documentation.

<text>  element


Text is an element that is used to tell the CallXML browser to use a text-to-speech engine to read text contained within the element to the user. No other tags may be nested within this element, the only allowable content is either variable names or TTS values. Note that the default TTS voice is the 'English Female' voice; this can be modified by specifying the 'voice' attribute of this element.


usage

<text cleardigits="(true|false)" termdigits="(123456789*#|ABCD)" voice="(TTS Voice)">


attributes

cleardigits Data Type: (true|false) Default: false
This attribute's value is a Boolean, indicating whether the queued digits buffer should be cleared when this action starts. "true" clears the digits buffer; "false" leaves the contents of the digit buffer alone.
termdigits Data Type: (123456789*#|ABCD) Default: none - attribute is optional
This attribute holds the list of touch-tone digits which can terminate the current caller action. Note that for each termdigit specified, there should be an <ontermdigit> handler in the code to catch the event. Allowable values are any one of "012356789*#", the ordinary DTMF (Touch-Tone) keypad possibilities, plus the special keypad tones found on some telephones "ABCD".
voice Data Type: (TTS Voice) Default: none - attribute is optional
The voice attribute defines the Text-to-Speech voice that should be used for what is enclosed within that particular <text> element. This allows the developer a way to override the default voice genders/styles on a prompt by prompt basis. The currently supported voices for the CallXML2.0 platform are:

  • English-Female2 (default)
  • English-Male2
  • French-Female1
  • Spanish-Female1



possible events

onerror type="linenotactive" Trying to issue a telephony event such as <getdigits> or <playaudio> on a non-active line
ontermdigit Used for catching and handling term digit events as they occur in the call flow. See the ontermdigit element description for further details.
onerror type="document" Document was unable to be fetched for all the reasons web servers are unavailable
onerror type="telephony" Unable to issue a telephony event such as <call> or <playaudio> or <ftp>
onhangup This event occurs when a session determines that one side of the call has hung up. A typical use for this handler is to execute any necessary clean-up code. See the onhangup element description for further details.



code samples

<Text termdigits - voice>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="2.0">
  <block label="B_1">
    <text termdigits="#" voice="English-Female2">
      Here is some TTS in the default English Female voice from Speechify.
      This TTS output can be ended at any time by pressing the pound key.
      So what the heck are you waiting for?
      Press the gol durn key on your phone!
    </text>

    <ontermdigit value="#">
      <text voice="English-Female2">
        Moving on, we will next check out the English male voice.
      </text>
      <goto value="#B_2"/>
    </ontermdigit>

  </block>

  <block label="B_2">
    <text termdigits="#" voice="English-Male2">
      Here is some TTS in the English Male voice from Speechify.
      This TTS output can be ended at any time by pressing the pound key.
      So what the heck are you waiting for?
      Press the gol durn key on your phone!
    </text>

    <ontermdigit value="#">
      <text voice="English-Female2">
        Moving on, we will next check out the Spanish Female voice.
      </text>
      <goto value="#B_3"/>
    </ontermdigit>

  </block>

  <block label="B_3">
    <text termdigits="#" voice="Spanish-Female1">
      Aqui esta algun TTS en la voz femenina espanola de Speechify.
      Usted tienen gusto de mis pantalones?
      Presione la llave de la libra para parar TTS.
    </text>

    <ontermdigit value="#">
      <text voice="English-Female2">
        Next, we will boogie down with the French Female voice.
      </text>
      <goto value="#B_4"/>
    </ontermdigit>

  </block>

  <block label="B_4">
    <text termdigits="#" voice="French-Female2">
      Voici un certain TTS dans la voix femelle francaise de Speechify.
      Veuillez appuyer sur la touche de livre pour
      me faire la reddition.
    </text>

    <ontermdigit value="#">
      <text voice="English-Female2">
        We are now done messing with the TTS voices.
        What did you expect, a celebrity voice?
    </text>
    </ontermdigit>

  </block>
</callxml>




additional links

none


  ANNOTATIONS: EXISTING POSTS
answervoice
9/5/2006 9:48 AM (EDT)
The correct parameter for the French language is French-Female and not French-Female1.
VoxeoJoe
9/5/2006 12:29 PM (EDT)
AnswerVoice,

I'll inform those who can change this page to do an update with the proper value.  Thanks for notifying us!


Sincerely,

Joe Gallina
Voxeo Corporation
MattHenry
9/5/2006 2:04 PM (EDT)


Patrick,

Actually, the documentation in this context is correct. "French-Female1" is used for Voxeo's US implementation, and the MAP telecom-specific TTS personas are listed in a dedicated thread so as not to cause confusion between the two platform implementations, (see the thread in the MAP forums titled "Thread #109861:  VoxPilot Porting Guide").

Regards,

~Matthew Henry



login



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