Initial Setup Properties |
||
Common (Voice and Data) |
||
Voice Only |
||
|
|
|
Data Only |
||
|
|
|
Runtime Properties |
||
Common (Voice and Data) |
||
Voice Only |
||
|
||
Data Only |
||
|
|
|
Greetings |
||
Voice Only |
||
|
||
Data Only |
||
|
||
Methods |
||
Common (Voice and Data) |
||
|
|
|
Events |
||
Common (Voice and Data) |
||
Overview
The Record control plays the Entry Greeting and then records a wave file by either creating a new file or appending to an existing file. Each message can be stored in a unique file name generated by the control. An options menu is provided to provide message review, re-record, and deletion.
Recording the File Name
A message's file name can be a unique name created by the Record control using the IFileName property, and the filename can also contain values from previous results in other controls. Use the asterisk (*) to indicate that a unique file name should be created. The Record control does this by replacing * with eight random characters when a call arrives at the control. For example, msg*.wav may be translated into msg12345678.wav. If an * is not specified, the same file is overwritten on every record operation. If the AppendFile option is specified, the file is appended rather than overwritten.
To create a filename that is dependent on the channel, use the %#channel% variable. This is replaced by the current channel number when the recording starts.
If a full path for the file is not specified, the VoiceDirectory is used, even if a language has been set by a Language control. However you can override this by adding the CurrentDirectory property into the file string, e.g. %VBVFrame.CurrentDirectory%msg*.wav. This records the file into the directory specified by the Language control.
Recording a file for the PlayMsgs control
The PlayMsgs control requires a .VNM (VBVoice New Message) file extension. For other files, use of .WAV is recommended. The standard VBVoice installation associates VNM files with SNDREC32.EXE in the registry. If you rely on this behavior, duplicate these settings in the target machine.
Terminating a Record
The recording is terminated when a DTMF key is pressed, when silence is detected using the MaxSil time, or when a hangup is detected. Normally any key detected during the record is used as a digit option key.
Digit Options
After making a recording, the control plays the MessageRecordedGreeting, followed by the OptionsGreeting if there are any option digits set and then waits for a digit. If no option digits are set, the control exits through the Done output after playing the MessageRecordedGreeting.
See Record Digit Options page.
Message Data
The Record control can associate a data string with each message recorded. It does this by filling in the INFO section of the Wave file. The info section has a maximum size of 256 bytes. The default data string is set using the property page item File Data (FileData property). This data can be changed in the Enter event using the MsgData property.
File Handling
The Record control records a new file into a temporary file in the target directory specified in the control setup. When the recording is saved, the temporary file is renamed to the required file name. If the record is cancelled or the record is not successful for any other reason, the temporary file is deleted and the destination file is not created. If the record is using Append mode, the file is appended in-place. If the recording is cancelled, the file is truncated to its original length.
Record Pause
Specifies the period of time to remain paused while waiting for another digit to restart recording. If no digit is received after five seconds, the PauseGreeting will be played. After the timeout defined by the PauseSecs property has expired, the recording is terminated, and call exits out of the Digit output. The OptionDigit property will be set to the value VBVDigit_None to signify that the timeout occurred. The time spent playing the PauseGreeting is not accounted for in the timeout period.
Error Handling
If an invalid option digit is received while waiting for a option digit and code in the OptionDigit event does not process the digit, VBVoice increments the error count and plays the InvalidGreeting and the OptionsGreeting again.
If no speech was detected during the record operation, VBVoice increments the error count, plays the SilenceGreeting and EntryGreeting, and restarts the record operation.
If no digits are detected while waiting for an option digit, VBVoice treats the condition as an invalid digit.
If the error count exceeds the maximum error count on an invalid digit or timeout, and a message has been recorded, the standard error processing sequence is NOT followed; instead, the call will exit out of the Message Recorded output, to allow the message to be processed by Data controls. If no message has been recorded, standard error processing is followed. See Invalid Digit, No Digits, and Silence Timeout.
Special Disconnect Handling
If a disconnect occurs in the Record control and a valid recording has been made, the system will ignore the Disconnect event and exit out of the Message Recorded output. This is to allow database updates to occur using the new message. The Disconnect event will occur on the next control that performs any voice processing operation.
Record Control Example
Use of this control is shown in RecordDB.