Indicates the type of text contained in the element (such as acronym, number, and date).
<ssml:say-as type="string"> </ssml:say-as> <ssml:say-as type="string:extension"> </ssml:say-as>
| Term | Definition |
|---|---|
|
type |
Required. Indicates the type of text contained in the element. The value is a string containing the name of the type. Use a format extension to indicate the value format for certain types of contained text by following the type name with a colon and the format specification. For example, type="date:dmy". |
Note: |
|---|
| The type attribute is specified by the World Wide Web Consortium Speech Synthesis Markup Language Specification Version 1.0 (W3C SSMLS) Working Draft of April 5, 2002, which is the specification that Speech Server 2004 supports. The W3C SSMLS Recommendation of September 2004 changes the name of this attribute to interpret-as. Office Communications Server 2007 Speech Server supports both the type attribute specified in the older W3C SSMLS Working Draft and the interpret-as attribute specified in the W3C SSMLS Recommendation. |
| Type | Format | Interpretation |
|---|---|---|
|
acronym |
|
Indicates that the contained text should be interpreted as an acronym. |
|
address |
|
Indicates that the contained text should be interpreted as a postal address. This functionality is only available for English. |
|
currency |
|
The contained text is a currency amount. |
|
date |
dmy , mdy , ymd , ym , my , md , dm , y |
The contained text is a date in the specified format. In the format extension d=day, m=month, and y=year. Following is an example: <ssml:say-as type="date:mdy">10-19-03</ssml:say-as> If a format extension is not included, the synthesis engine, by default, interprets a date as a sequence of month followed by day. |
|
name |
|
The contained text is a name. |
|
net |
|
The contained text is an e-mail address. |
|
net |
uri |
The contained text is a Uniform Resource Indicator. |
|
number |
|
The contained text is an integer, a fraction, a floating-point, Roman numerals, or some other format that should be spoken as a number. |
|
number |
cardinal |
The contained text should be interpreted as an cardinal number. |
|
number |
ordinal |
The contained text should be interpreted as an ordinal number. |
|
number |
digits |
The contained text should be spoken as a sequence of digits. The following example is rendered as "one two three four five": <ssml:say-as type="number:digits">12345</ssml:say-as> |
|
spell-out |
|
Indicates that the contained text is a series of letters that should be pronounced individually. Following is an example. <ssml:say-as type="spell-out">test</ssml:say-as> |
|
time |
|
The contained text is a time. Express time according to a 12-hour clock. Indicate whether the time is A.M. or P.M. by placing the string "A. M." or "P. M." immediately after the ssml:say-as element that contains a time. Following is an example. At <ssml:say-as type="time">4:00</ssml:say-as> P. M. Hours 1???9 can be expressed in single digit form or with leading zeros (01???09). Hours expressed with leading zeros are read as "oh" plus the digit (for example, 09 is read as "oh nine"). Use a colon to separate numbers representing hours, minutes, and seconds. The following time strings are all valid examples: 12:35, 1:14:32, 08:15, and 02:50:45. |
|
telephone |
|
The contained text is a telephone number. |
The text-to-speech (TTS) engine normally interprets the various types of text listed in the preceding table automatically, using a text normalization process. The recommended use of the ssml:say-as element is in instances in which automatic text normalization fails to correctly interpret an item. The ssml:say-as element acts as a hint to the TTS engine regarding the proper interpretation of the text contained within the element.
The type and type:format values listed above are supported for desktop speech applications (speech applications that use the local SAPI TTS engine). For speech applications deployed in an Office Communications Server 2007 Speech Server environment, the following type and type:format values are not fully supported:
-
number ??? Roman numerals (for example, i, ii, iii, and iv) are not pronounced correctly.
-
number:cardinal ??? Roman numerals (for example, i, ii, iii, and iv) are not pronounced correctly.
-
net:uri ??? The punctuation separating the scheme and host name are not pronounced. For example, for a URI that begins with http://, the pronunciation string does not include the words "colonforward-slashforward-slash."
-
name ??? Roman numerals (for example, i, ii, iii, and iv) are not pronounced correctly. Common prefixes and titles must begin with a capitalized letter to produce the correct pronunciation (for example, Mr., Mrs., Jr., and Sr.).
-
address ??? Abbreviations for common street types must begin with a capitalized letter to produce the correct pronunciation (for example, St. and Ave.).
For values with multiple fields in the contained text, separate the fields using a single, non-alphanumeric character. For example, represent a date value contained in a ssml:say-as element by separating the fields for day, month, and year with a hyphen (10-19-03) or a slash (10/19/03).
<?xml version="1.0" encoding="ISO-8859-1"?> <ssml:speak version="1.0" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"> <ssml:p> Your <ssml:say-as type="number:ordinal">1st</ssml:say-as> request was for <ssml:say-as type="number">1</ssml:say-as> room on <ssml:say-as type="date:mdy">10/19/2002</ssml:say-as>, costing less than <ssml:say-as type="currency">$80</ssml:say-as>. </ssml:p> </ssml:speak>
Note: