Displaying Speech Results in a Dialog Box

The following example script prompts the user for a number, converts the spoken number into text, and displays it in a dialog box on the mobile device. This script requires the connected_digits grammar file.

String(sResult)
Speech_From_Text(“Say a number”,FALSE)
Speech_To_Text(sResult, "connected_digits")
Ask_OK(sResult,”Number Returned”)
Return

In this example the number is treated as a string because both the functions Speech_To_Text and Ask_OK require a string. However, it could be converted to a number if needed by using the following line:

nResult = String_To_Number_Decimal (sResult)

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal