RecordVoiceSegment

Purpose

Use RecordVoiceSegment to record a voice segment that is played to a caller as digitized voice data.


A screen capture of the Action RecordVoiceSegment window

Description

This action stores the voice data in a temporary workspace. The voice data remains in the workspace until it is saved to disk by SaveVoiceSegment, until another voice segment is recorded, or until the voice segment is deleted from the workspace.

A beep warns the caller when RecordVoiceSegment is about to reach the maximum time allowed for recording. The Record Voice Warning Time system parameter in the Blueworx Voice Response parameter group sets the number of seconds before the timeout that the warning beep is issued. The timeout value is set by the Record Voice Maximum system parameter.

It is not necessary to set any system variables before using RecordVoiceSegment, but you may want to consider whether you want to save the voice segment in a compressed or uncompressed format. For further discussion on this, see voice quality and compression in the Blueworx Voice Response for AIX: Designing and Managing State Table Applications information , and using the system variable System: Voice segment compression type (RW) (SV50).

To override the default maximum recording time, you can set the System:Maximum record time system variable (SV179). (The default is specified by the Record Voice Maximum system parameter.)

Before starting to re-record an existing voice segment, make sure that there is no possibility of the voice segment being played at the same time.

The stop key can be pressed to indicate that the user has finished recording a voice segment. The default stop key is the asterisk (*) on the telephone key pad, but can be reset to another key, using the Stop Key system parameter in the Application Server Interface parameters group. Alternatively, you can define more than one DTMF stop key by using SV183 (for more information see System: Play/Record: Alternate stop keys (RW) (SV183)).

The pause key can be pressed if the user needs to stop and then continue recording. The default pause key is the number 8 on the telephone key pad, but can be reset to another key, using the Pause Key system parameter in the Application Server Interface parameters group.To start again after a pause, the user presses the pause key again.

RecordVoiceSegment causes an automatic fade out of any background music. You can override this by using the System: Music: Automatic fade before actions system variable (SV226).

All input is flushed before this action starts, that is, any queued DTMF, voice interrupt detection or fax tones will be lost.

Parameters

No parameters are required.

Possible results

RecordVoiceSegment can have one of the following results:

Succeeded
The recording, which can be silence, has been stored in the workspace.

The system variable System: Action additional information (SV180) will be set with one of the following values:

0
Recording was terminated by something other than silence.
1
Recording was stopped because the caller was silent for the period specified in the system parameter Maximum Silence Duration (ms), after making an utterance.
Note: If you want to use the information in SV180, you must check it immediately after a state table action because it is reset by other actions.
Voice Channel Problem
The voice segment was not recorded, because there was a problem with the voice channel on which it was supposed to be played.
No Voice Recorded
The voice segment was not recorded.
Disk Full
There is no room on the disk for the voice data.
Max Time Limit Reached
The system parameters define how long a caller can take to record. This amount of time has elapsed.
Caller Hung Up
The caller has hung up.

ASCII syntax

When using an ASCII editor, code this action as the example demonstrates:

label: "Check Edges"
        RecordVoiceSegment()
          edge EDGE_RECVCE_COMPLETED:    completed
          edge EDGE_RECVCE_LINE_PROBLEM:        line_problem
          edge EDGE_RECVCE_NO_VOICE:            no_voice
          edge EDGE_RECVCE_DISK_FULL:           disk_full
          edge EDGE_RECVCE_MAX_TIME:            max_time
          edge EDGE_HUP:                                  hup
        ;

The edges are described above under "Possible results". For more information, see Testing a state table using the debugger.