Built-in field types and grammars

The built-in field types and grammars for Simplified Chinese are listed here.

Table 1. Simplified Chinese built-in types
Element Implementation details
boolean Users can say positive responses such as
affirmative word in Simplified Chinese
, or negative responses such as
negative word in Simplified Chinese
.

Users can also provide DTMF input: 1 is yes, and 2 is no.

The return value sent is a boolean “true” for a positive response or “false” for a negative response.

currency Users can say currency values from 0 to 999,999,999.99 including common constructs such as
currency word in Simplified Chinese
.

Users can also provide DTMF input using the numbers 0 through 9 and optionally the * key (to indicate a decimal point), and can terminate DTMF entry using the # key.

The return value sent is a string in the format UUUddddddddd.cc, where UUU is a currency indicator; in Simplified Chinese version, “RMB” will be used.  If the field name is subsequently used in a value attribute within a prompt, the TTS engine will speak the currency value.

date Users can say a date using years, months and days, as well as the words
yesterday in Simplified Chinese
,
today in Simplified Chinese
, and
tomorrow in Simplified Chinese
.  Common constructs such as
date word in Simplified Chinese
or
date word in Simplified Chinese
are supported.

Users can also provide DTMF input in the from yyyymmdd.

Note: The date grammar does not perform leap year calculations;
February 29th in Simplified Chinese
is accepted as a valid date regardless of the year.  If desired, your application or servlet can perform the required calculations.

The return value sent is a string in the format yyyymmdd, with the VoiceXML browser returning a ? in any positions omitted in spoken input. If the value is subsequently spoken in <say-as> with the interpret-as value vxml:date, then it is spoken as a date appropriate to this language. For example, the TTS engine speaks
date in Simplified Chinese
.

digits Users can say numeric integer values as individual digits (0 through 9). For example, a user could say 123456 as
date in Simplified Chinese
.

Users can also provide DTMF input using the numbers 0 through 9, and must terminate DTMF entry using the # key.

The return value sent is a string of one or more digits. If the result is subsequently used in <say-as> with the interpret-as value vxml:digits, it will be spoken as a sequence of digits appropriate to the current language. In the above example, the TTS engine speaks 123456 as
date in Simplified Chinese
.

Note: Use this type instead of the number type if you require very high recognition accuracy for your numeric input.
number User can say natural numbers (that is, positive and negative integers and decimals) from 0 through 999,999,999,999 as well as the word
dot in Simplified Chinese
(to indicate a dot) and
minus in Simplified Chinese
(to indicate a negative number).

User can also provide DTMF input using the numbers 0 through 9 and optionally the * key (to indicate a dot), and must terminate DTMF entry using the # key.

Note: Only positive numbers can be entered using DTMF.

The return value sent is a string of one or more digits, 0 through 9, with a decimal point and a + or - sign as applicable .If the field is subsequently spoken in <say-as> with the interpret-as value vxml:type, where type is the type number you want to specify, then it is spoken as that type number appropriate to this language. In the above example, the TTS engine speaks 123456 as
123456 in Simplified Chinese
.

Use <say-as interpret-as="vxml:digit"> to have the number said as a string of digits.

phone Users can say a telephone number including the optional word
extension word in Simplified Chinese
or
extension word in Simplified Chinese
.  

Users can also provide DTMF input using the numbers 0 through 9 and optionally the * key (to represent the word “extension”), and must terminated DTMF entry using the # key.

The return value sent is a string of digits which includes an x if an extension was specified. If the field is subsequently spoken in <say-as> with the interpret-as value vxml:phone, then it is spoken as a phone number appropriate to this language.

Note: For tips on minimizing recognition errors that are due to user parses during input, see Using the built-in phone grammar.
time Users can say a time of day using hours and minutes in either 12- or 24-hour format, as well as the word
time of day word in Simplified Chinese
.

Users can also provide DTMF input using the numbers 0 through 9.

The return value sent is a string in the format hhmmx, where x is a for a.m, p for p.m, h for 24 hour format, or ? if unspecified or ambiguous; for DTMF input, the return value will always be h or ?, since there is no mechanism for specifying a.m.or p.m. If the field is subsequently spoken in <say-as> with the interpret-as value vxml:time, then it is spoken as a time appropriate to this language. For example, the TTS engine speaks
expression of time in Simplified Chinese
.