say-as

say-as element

Aids the TTS engine in pronunciation by resolving ambiguities regarding the meaning of the contained text.

Syntax

<say-as
type = "string"
/> 

Attributes

type

Specifies the type of text contained by the say-as element.

addressThe contained text is a postal address.
currencyThe contained text is a currency value.
date:mdyThe contained text is a date formatted as mm/dd/yyyy.
date:yThe contained text contains a year.
number:digitThe contained text is to be read as a sequence of one or more digits.
telephoneThe contained text is a telephone number.
time:hThe contained text is an hour.
time:hmThe contained text is a time formatted as hour followed by minutes.
time:hmsThe contained text is a time formatted as hour followed by minutes followed by seconds.

Parents

audio, emphasis, enumerate, foreach, p element, prompt, prosody, s element, voice

Children

value

Examples

When the following example is executed, the TTS engine reads back several addresses. The TTS engine expands common suffixes (e.g. "St", "Rd", "Dr") if the street name is preceded by a number.

<vxml version="2.0" 
  xmlns="http://www.w3.org/2001/vxml"
>
  <form>
    <block>
      <prompt>
        <say-as type="address"> 1310 Villa St </say-as>
        <say-as type="address"> 20 Greenwood Rd </say-as>
        <say-as type="address"> 19 Cheryl Dr </say-as>
        <say-as type="address"> 220 Cypress Ct </say-as>
      </prompt>
    </block>
  </form>
</vxml>

When the following example is executed, the TTS engine reads back the amount "twenty dollars and forty-five cents."

<vxml version="2.0" 
  xmlns="http://www.w3.org/2001/vxml"
>
  <form>
    <block>
      <prompt>
        <say-as type="currency"> $20.45 </say-as>
      </prompt>
    </block>
  </form>
</vxml>

When the following example is executed, the TTS engine reads back the date "May twentieth, nineteen seventy seven" three times.

<vxml version="2.0" 
  xmlns="http://www.w3.org/2001/vxml"
>
  <form>
    <block>
      <prompt>
        <say-as type="date"> May 20, 1977 </say-as>
        <say-as type="date"> 5/20/1977 </say-as>
        <say-as type="date:mdy"> 5/20/1977 </say-as>
      </prompt>
    </block>
  </form>
</vxml>

When the following example is executed, the TTS engine reads back the telephone number "one, eight hundred, five five five, eight nine six five" twice.

<vxml version="2.0" 
  xmlns="http://www.w3.org/2001/vxml"
>
  <form>
    <block>
      <prompt>
        <say-as type="telephone"> 1-800-555-8965 </say-as>
<say-as type="telephone"> 1 (800) 555-8965 </say-as>
      </prompt>
    </block>
  </form>
</vxml>