Play a Text-To-Speech string and recognize a single word using the installed speech recognition engine. You must have a CSP enabled port in order to use this function
[Visual Basic] Overloads Public Shared Function PlayTTSAndRecognizeWordW( _ ByVal GrammerFile As String, _ ByVal chdev As Integer, _ ByVal ttsstr As String, _ ByVal digmask As String, _ ByVal ClearDigitBuffer As Integer, _ ByVal EnableBargeIn As Integer, _ ByVal Timeout As Integer, _ ByVal error_file As String, _ ByRef RecognizedWord As String, _ ByRef Score As Integer _ ) As TermCode
The name of the recognition engine grammer file for this prompt. This contains the list of possible words that may be spoken and recognized. For example, this is an example of a Yes / No grammer file: #ABNF 1.0 UTF-8; language en-US; mode voice; tag-format lumenvox/1.0; root $Bool; $Yes = yes $GARBAGE|yep|yeah|sure|correct; $No = no $GARBAGE|nope; $Bool = $Yes {$="true";}|$No {$="false";}; For this parameter you would pass “ABNFBoolean.gram” of which the above would be contained. See LumenVox documentation for more information. You could also use a built in grammer an pass something like this in the string: "builtin:grammar/boolean"
chdev
The voice resource device
ttsstr
The string you want converted into speech.
digmask
This is a pointer to a string of digits that will terminate playing the file if pressed. Valid digits are 1-9 and the # and * key. For example, if you wished to terminate on the 1 key OR the # key, send the string “1#”. If you pass the string “ANY”, playing will be terminated upon any press of a key. Pass the empty string “” if you wish for the file NOT to be interrupted.
ClearDigitBuffer
This is a TRUE or FALSE value. If true, any digits sitting in the board’s digit buffer are cleared before getting the new digits. Usually this is set to TRUE.
EnableBargeIn
0 – Disable the dialogic CSP BargeIn – start streaming to LumenVox as soon as the play starts. This option will require more LumenVox resources. 1 – Enable the dialogic CSP BargeIn – do not start streaming to the LumenVox until dialogic CSP detects user utterance. 2 – Enable the dialogic CSP BargeIn but do not allow a barge in until the whole file has played to completion. Then start streaming to LumenVox.
Timeout
How many seconds to wait for a valid response.
error_file
This is a full path to a file which speaks of a system error and a technical support number to call. This file must be a separate file and not part of a VAP file
RecognizedWord
Returns the word from the grammer file that the user spoke.
Score
Returns a score 1 to 1000 of how closely of a match. The higher the better or more likely the user actually said the word returned.
Return Value
The terminating event. See TermCode enum for a list of terminating events. (i.e. TM_EOD if it returned because the file played to the end.