PlayBeep

Purpose

Use PlayBeep to play a long or short beep to a caller.


A screen capture of the Action PlayBeep window

Description

Plays a beep to the caller to indicate that they can begin to speak. This is useful if the application is using speech recognition without barge-in, but only if using SendData to instruct the custom server to start sending voice data to the recognizer.

For the PlayBeep action to succeed, the voice channel must already be connected (through the successful completion of either an AnswerCall or Makecall action). For incoming calls, the voice channel can also be connected prior to an AnswerCall action, if the system parameter Connect Voice Channel Before Answer is enabled (this parameter is only available if you are logged on as field).

You should not play a beep if the application is using speech recognition with barge-in, or the RecordVoiceToHost action to send voice data to a recognizer, as the state table cannot determine if a caller has already started to speak before the end of the prompt. There is no guarantee that the caller has uttered the stop word before the end of the prompt, or that the recognizer has recognized the stop word if it is uttered before the end of the prompt.

Use PlayBeep with the CA_Record_Voice_Stream() custom server subroutine in applications not using barge-in. Specify RECORDSTART_TRIGGER_ON_BEEP in the CA_Record_Voice_Stream() call, to synchronize the start of voice capture with the playing of the pacing tone. This ensures that any utterance made by the caller before the beep, or any echo from the voice prompt, is not passed to the speech recognizer.

PlayBeep can be used with background music. If you don't want background music playing at the same time as the beep, precede this action with a ControlMusic action and set the fade time to 100.

Parameters

Long Beep
Specifies that the beep to be played is long.
Short Beep
Specifies that the beep to be played is short.

Possible results

Succeeded
The beep was played successfully.
Caller Hung Up
The caller hung up the telephone.

ASCII Syntax

When using an ASCII editor, code this action as follows:

label1: "play a long beep"
PlayBeep("LONG_BEEP")
edge EDGE_PB_SUCCESS:
edge EDGE_HUP:
;

or

label2: "play a short beep"
PlayBeep("SHORT_BEEP")
edge EDGE_PB_SUCCESS:
edge EDGE_HUP:
;

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