The say-as element indicates the content type (such as number or date) of text contained in the element. This provides guidance to the speech synthesis engine about how to pronounce the contained text.
Required. Indicates the content type of text contained in the element. The SSML 1.0 say-as attribute values specification defines six content types.
Optional. Provides additional information about the precise formatting of the contained text for content types that may have ambiguous formats. SSML defines formats for content types that use them.
Optional. Indicates the level of detail to be spoken. For example, this attribute might request that the speech synthesis engine pronounce punctuation marks.
There are no standard values defined for the detail attribute. Support for this attribute depends on the individual speech synthesis engine.
The following table lists the supported content types for the interpret-as attribute, and the supported values for the format attribute, where applicable.
dmy, mdy, ymd, ym, my, md, dm, d, m, y
The contained text is a date in the specified format. In the format designations, d=day, m=month, and y=year. The format for date indicates which date components are represented and their sequence. The following is an example of a say-as element that contains a date:
The contained text should be spoken as a cardinal number. The following is an example of a say-as element that contains a cardinal number:
The contained text should be interpreted as an ordinal number. The following is an example of a say-as element that contains an ordinal number:
Indicates that each letter in the contained text should be pronounced individually (spelled out). The following is an example of a say-as element that contains a word that should be spoken as individual letters:
The contained text is a time. Time may be expressed using either a 12-hour clock (hms12) or a 24-hour clock (hms24).The format attribute indicates which clock to use. The following is an example of a say-as element that contains a time:
The contained text is a telephone number. The format attribute may contain digits that represent a country code, for example “1” for the United States or “39” for Italy. The speech synthesis engine may use this information to guide its pronunciation of a phone number. The country code may also be included in the phone number, and if so, takes precedence over the country code in the format attribute if there is a mismatch. The following is an example of a say-as element that contains a telephone number:
The speech synthesis engine should speak the following example as “Your first request was for one room on October nineteenth twenty ten with early arrival at twelve thirty five P M”.
<?xml version="1.0" encoding="ISO-8859-1"?> <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"> <p> Your <say-as interpret-as="ordinal"> 1st </say-as> request was for <say-as interpret-as="cardinal"> 1 </say-as> room on <say-as interpret-as="date" format="mdy"> 10/19/2010 </say-as>, with early arrival at <say-as interpret-as="time" format="hms12"> 12:35pm </say-as>. </p> </speak>
For more information, see the SSML 1.0 say-as attribute values and the Speech Synthesis Markup Language (SSML) Version 1.0