Previous Topic

Next Topic

Book Contents

Book Index

Home Page

Record Variables

"Record" (that's ree-cord) variables are used to prompt and manage the recording of audio input from the user during a phone call. There are four "Record" variables: Record, RecordWave, SaveFileAfterRecord, and StopRecordOnSilence.

The recording process involves using the Record or RecordWave variables to initiate audio recording. After a recording starts, it is stopped for any of four reasons:

  1. The user stops talking and Active Call Center terminates the recording after detecting silence.
  2. The user stops the recording manually by pressing a touch tone key.
  3. The call is terminated for any reason.
  4. The maximum recording limit or Node timeout is reached.

After recording is stopped, recorded audio is saved into the Call History. Active Call Center can record a maximum of 8 minutes of audio depending on the timeout settings at the Node.

Record and RecordWave Prompt Audio Recording

The Record and RecordWave variables are used to prompt the user to record audio. Only one of these variables will be processed at any given Node, and as a result, only one audio recording can take place at each Node. The Record variable, like "Speak" variables, uses text-to-speech generation to prompt audio. RecordWave, like "SpeakWave" variables, uses a pre-recorded audio prompt to start the recording process.

The Record variable should be set to the text that is to be converted to speech and spoken to the user. Here's a simple piece of Macro code taken from the Quick-Start Tutorial that uses the Record variable:

' Prompt the user to leave a message for Bill
Record = "Please leave a message for Bill at the beep."

If you've experimented with the Quick-Start Tutorial at all, you know that this piece of code results in a text-to-speech generated audio prompt that says "Please leave a message for Bill at the beep.".

RecordWave works similar to Record, except that RecordWave should be set to the name of the wave file to use for the prompt. For example, we might alter the code above to use a pre-recorded prompt to initiate audio recording:

' Prompt the user to leave a message for Bill
RecordWave = "C:\Prompts\PromptRecording.wav"

The code above will use the wave file called "PromptRecording.wav" to initiate audio recording.

Everything discussed in the previous section on Speak variables that applies to Speak and SpeakWave variables also applies to Record and RecordWave: use of control tags is allowed in Record, file format requirements for "SpeakWave" and RecordWave variables are identical, filenames for RecordWave should be fully qualified, etc.

SaveFileAfterRecord to Save Audio to a WAV File

By default, recorded audio is stored in the Call History. There will be situations when the developer will want to save the recorded audio to a wave file so that the recorded audio can be used later; some examples include:

The SaveFileAfterRecord variable allows specification of a filename that will receive the audio recorded via the Record and RecordWave variables. To use the SaveFileAfterRecord variable, set the variable to the name of the filename in which to save recorded audio.

The following piece of VBScript Macro shows how to accomplish this task:

' Prompt the user to leave a message for Bill
Record = "Please leave a message for Bill at the beep."
' Save the recorded audio file.
SaveFileAfterRecord = "C:\Message for Bill.wav"

Try adding the SaveFileAfterRecord line shown above into the "Call_for_Bill" Node of the Quick-Start Tutorial to see what happens. Check in your C:\ folder after recording a message for Bill, and look for the "MessageForBill.wav" file.

Remember that the SaveFileAfterRecord variable, like other Active Call Center variables, is processed after the script has finished executing. Therefore, any manipulations performed on a saved file must be done at the next Node.

Tip: Use the CallID variable to create a unique file name for each message so that old messages aren't erased as new messages come in. The CallID variable is discussed later, but to experiment with it, change the last line of the example above to read:

SaveFileAfterRecord = "C:\Message for Bill #" & _
CallID & ".wav"

Tip: Refer to a later section to learn how to amplify recorded audio for playback over a telephone.

StopRecordOnSilence Changes Recording Timeout

By default, recording is stopped after about three seconds of silence. Some applications will require longer allowable periods of silence, for example:

Use the StopRecordOnSilence variable to adjust the silence interval used to stop recording. Set the variable to the number of milliseconds to use for the silence timeout, for example:

StopRecordOnSilence = 10000

changes the behavior so that 10 seconds (10,000 milliseconds) of silence is required to stop recording.

Note: be careful using excessively high silence timeouts. If a hangup is detected before the recording stops, recorded audio does not get saved. Since most hangups take about 5-10 seconds to detect, setting the silence timeout above such a value will cause recorded audio to be lost in some cases.

Adjusting the Silence Detection Levels

Silence detection is performed by monitoring audio energy on the phone line. Active Call Center recognizes audio energy below a certain threshhold as silence during recordings.

Adjust silence detection levels by using Tools ... Voice Telephony Settings from the menu bar. Higher levels move the silence threshhold higher so that louder noises qualify as silence. Valid values are between 100 and 5000.

Playing Recorded Audio

Recorded audio is always saved to the Call History. To play recorded audio from the Call History, locate the appropriate call and click on the "RecordedAudio" fields in the right hand pane.

For audio saved to wave files using the SaveFileAfterRecord variable, find the wave file in Windows Explorer and double click or use Windows Sound Recorder to open the file.

To play audio saved to wave files on later calls, use the "SpeakWave" or "SpeakInteractiveWave: variables and set their values to the name of the wave files saved with SaveFileAfterRecord.

Order in Which Record and RecordWave Variables are Processed

The exact order in which "Speak" and "Record" variables are processed is discussed in the previous section on Speak variables. Record and RecordWave are always processed after all the "Speak" variables (Speak1, Speak2, etc. and SpeakWave1, SpeakWave2, etc.) and before all the "SpeakAfterRecord" variables. For example, the following snippet of code is incorrect:

Speak1 = "You will now be asked to record a message."
Record = "Begin recording at the beep."
Speak2 = "Thanks for leaving a message."

Since the "Speak" variables are processed first, the recording prompt will come after the "Thanks for leaving a message." Correct this error by using "SpeakAfterRecord" variables for the "thank you" message:

Speak1 = "You will now be asked to record a message."
Record = "Begin recording at the beep."
SpeakAfterRecord1 = "Thanks for leaving a message."

Also remember that Record variables are always processed after the Macro has executed. Therefore, only one recording can take place at each Node. The example below will not behave as desired:

Record = "leave a message for Mary at the beep."
Record = "Now leave a message for Bill at the beep."

The final value of the Record variable at the end of the Macro, "Now leave a message for Bill at the beep", will be the only prompt heard by the caller. To record two separate messages, the Call Tree should perform the second recording in a different Node.

Potential Problems with Recording

The quality of recorded audio will depend largely on your telephony device or modem. Test all Call Trees that use recordings carefully, as early hang-ups and disconnects can sometimes cause loss of audio. Even worse, some devices do not begin recording audio immediately. In any case, the safest course of action is to test all Call Trees thoroughly with your specific configuration.

See Also

Variables Used in Macros

Response Variable

GotoNode Variable

Speak Variables

SpeakInteractive Variables

SpeakInteractiveWave Variables

Touch Tone Buffer Variables

Caller ID Variables

Call Information Variables

TransferCallTo Variable

PlayTouchTones Variable

SendModemCommands Variable

Node Variables

Creating Extra Global Variables