Configurable Phrase Algorithm Compiler

FFAMOUNT cmdflag source
FFAMOUNT -d filename > newalg

FFAMOUNT can be used either to test or to compile your algorithm file for the CopiaFacts Phrase-Speaking Feature. It can also operate in the reverse direction to recover a missing algorithm file and to split a multi-segment file into its constituent parts.

Command-Line Arguments:

cmdflag one of the following command options:
-t test the algorithm by entering values at the keyboard
-c compile the algorithm into the output file specified in the source
-split split target file to (overwrite) original separate files
source the source file containing the algorithm specification
filename the name of the multi-segment voice file to be decompiled to recover an algorithm file.
newalg the output of a decompile operation

To test the algorithm, type lines at the console or redirect input from a file. Each input line should consist of the string to convert plus, optionally, the prefix and suffix numbers to use (default 1). The program will display the results of the algorithm (a list of phrases) as each input line is processed. These phrases are taken from the comments in your source file. Once the algorithm has been tested, all you have to do is use the CopiaFacts Recording Studio to record each word or phrase, prompted by the same comments from your algorithm source. Then compile the algorithm to produce the multi-segment voice file.

To terminate the program in console test mode, use CTRL-C, or F6 followed by Enter.

Note that the default prefix and suffix numbers are 1 (to select the first prefix or suffix). To suppress the prefix or suffix, you need to enter a zero.

The environment variable DECIMALS may be set to a numeric value to change the number of decimals from the default value of 2. Note that this environment variable is not used by the main COPIAFACTS program, in which you can assign a value to the DECIMALS system variable instead.

The decompile and split options are used as follows: if you have mislaid your custom algorithm file and need to modify a multi-segment voice file, use the decompile option to create a new algorithm file. This file will not have correct comments on the filename lines, so you will need to edit these in order to use the -t option to test the file. The generated algorithm file contains generated filenames with numeric names (either .VOX or .WAV). When you have an algorithm file matching the multi-segment file, you can use the -split option to extract out the separate segment files. These will silently overwrite existing files with the same names.

The supplied 'standard' files FAXFACTS.DIG and FAXFACTS.AMT have no embedded algorithm; their algorithms are built into COPIAFACTS because they pre-date the algorithm feature. If you wish to make similar files, use the ALG files that you will find in the VOICEWRK folder (FFDIGIT.ALG and FFAMOUNT.ALG respectively) as models.

Example:

To test your French amount playback file algorithm:

FFAMOUNT -t amountfr.alg

At the keyboard,

Enter:        Program displays:
92        quatre-vingts douze
21        vingt et un
32        trente deux
^C        (terminate)

See Also:

CopiaFacts Phrase-Speaking Feature.