Speak the Contents of a Variable

$play_var @varname playtype|filename [prefix [suffix]]

This command plays (speaks) the numeric (or other) contents of a CopiaFacts variable. When this command is used, either no $image_desc command must be given in the same .IIF file, or the default $image_desc keyword digits must be given. There should also be no $tts_file or $tts_text command in the same IIF.

The parameters on this command are used as follows:

varname the name of the variable of which the value is to be spoken, or a constant value (without @).
playtype one of the following keywords:
digits speak individual digits (e.g. "two-five") using the default digit playback file.
amount speak the integer and two-digit decimal place value (if present) of a numeric value, usually as a monetary amount (e.g. "twenty-five-dollars and fifty cents"), using the default amount playback file.
filename the name of the indexed multiple-segment voice file to be used to speak the amount. This file must be created with the FFAMOUNT program and its embedded speaking algorithm will be used.  If an XML file is specified, the phrase-speaking feature will NOT be used and the XML file should be devised to speak the value from @TTS_VALUE.
prefix/suffixsome files produced by FFAMOUNT can have a table of different prefix and suffix phrases, allowing the same file to be used to describe different types of variable. If you are using this type of file you can use these fields to select the prefix and suffix numbers. If no entry is made, the default is 1 (the first prefix or suffix). To suppress the prefix or suffix, use a value of zero.  These values will be passed to an XML file in TTS_PREFIX and TTS_SUFFIX variables.

Remember that you cannot use the variable resulting from a $get_var command in the same .IIF file that contains the $get_var command. To speak back an entered $get_var value, you can either use $validate "digits" which uses only the default digits file, or you can transfer to a $next_box which will speak the value of the variable with $play_var.


$play_var @ID digits 0