# <say-as>

Description

Indicates information on the type of text construct contained within the element and helps specify the level of detail for rendering the contained text.

In older versions of the SSML spec, this element defined different text format types (see `type` attribute, below). However, the latest version of the spec acknowledges that defining a comprehensive set of types is difficult because of the variety of languages that must be considered and because of the innate flexibility of written languages. Therefore, SSML no longer enumerates the possible attribute values; they are now vendor-specific.

Syntax

    <say-as
        interpret-as="construct_type"
        format="string"
        detail="string"
        type="construct_type"
        sub="string">
      text
    </say-as>

Attributes

Attribute | Description
interpret-as | Indicates the content type of the contained text construct. This may have values that are similar to the previous `type` attribute. See your vendor documentation for supported values. Required.
format | Further specifies the precise formatting of the contained text for content types that may have ambiguous formats. The legal values for this attribute depend on the value of the `interpret-as` attribute. See your vendor documentation for supported values. Optional.
detail | Indicates the level of detail to be read aloud or rendered. This attribute can be used for all `interpret-as` types. See your vendor documentation for supported values. Optional.
type | In the latest version of the SSML spec, this is replaced by interpret-as, format, and detail attributes. See your vendor documentation to confirm which attributes are supported/recommended. Indicates the text construct type. The values of type can optionally contain a colon and format: acronym - contained text is pronounced as individual characters. address - contained text is a postal address. currency - contained text is an amount of currency. date, date:dmy, date:mdy, date:ymd, date:ym, date:my, date:md, date:y, date:m, date:d - contained text is a date, with presence/order of year, month, and day optionally specified. See note below. duration, duration:hms, duration:hm, duration:ms, duration:h, duration:m, duration:s - contained text is a time duration, with presence/order of hours, minutes, and seconds optionally specified. See note below. measure - contained text is a measurement. name - contained text is a proper name (i.e., person, company, etc.) net - contained text is an internet handle. The net type can include one of the following formats: email, uri. number, number:ordinal, number:digits - contained text is an integer, fraction, floating point, Roman numeral, or other textual format that can be interpreted and spoken as a number, with format optionally specified. telephone - contained text is a telephone number. time, time:hms, time:hm, time:h - contained text is a time of day, with presence/order of hours, minutes, and seconds optionally specified. See note below. Note: When multi-field quantities are specified in the type format (ex. "dmy", etc.), it is assumed that the fields are separated by a single non-alphanumeric character, in the contained text.
sub | In the latest version of the SSML specification, this is replaced by the <sub> tag. See your vendor documentation to confirm which syntax is supported/recommended. Defines substitute text to be spoken instead of the contained text.

Parents

<audio>, <choice>, <emphasis>, <enumerate>, <foreach>, <paragraph>, <p>, <prompt>, <prosody>, <sentence>, <s>, <speak>, <voice>

Children

<value>, #PCDATA

Limitations/Restrictions

- `<say-as>` is only supported as a child of `<foreach>` when `<foreach>` is used within `<prompt>`.
- Refer to your vendor documentation for support details.

Example

To include speech markup tags, insert the SSML tags inside one of the `<prompt>`, `<audio>`, `<choice>`, `<enumerate>`, or `<foreach>` (within `<prompt>`) elements.

    <prompt>
       <say-as type="acronym">XML</say-as>
       You still owe me <say-as type="currency">$12345.67</say-as>
       Today's date is <say-as type="date:ymd">2005/01/01</say-as>
       My email address is
       <say-as type="net:email">docs@voicegenie.com</say-as>
    </prompt>