Use PlayVoiceSegment to play the digitized voice data that speaks a voice segment.
PlayVoiceSegment can play back a voice segment either from disk, or from the temporary workspace in which the system holds it until it is saved.
Do not use PlayVoiceSegment for normal voice segments played from within an application; use PlayPrompt instead. Voice segments played with PlayVoiceSegment are retrieved from the database each time they are played. Voice segments played with PlayPrompt are cached within Blueworx Voice Response, which significantly increases performance. Do not save data at the same time it is being played. If you do so, the Play action will fail.
For the PlayVoiceSegment action to succeed, the voice channel must already be connectedthis is achieved through the successful completion of either an AnswerCall or a Makecall action. For an incoming call, 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).
If you use uncompressed voice segments with the PlayVoiceSegment action, this produces more network traffic when your Blueworx Voice Response system is part of a single system image.
The compression type of the voice segment must match the type in the system variable System: Voice Segment Compression Type (SV50). If a segment of that compression type does not exist, PlayVoiceSegment returns Voice Record Not Found.
While a voice segment is playing, the caller can press keys to fast-forward, pause, reverse, or stop. System parameters in the Application Server Interface parameter group set these keys as follows:
Activity |
Default Key |
System Parameter |
---|---|---|
Fast forward |
9 |
Forward Key |
Pause |
8 |
Pause Key |
Reverse |
7 |
Reverse Key |
Stop |
* |
Stop Key |
In addition, system parameter SV183 can be used to specify other DTMF keys that can stop the action. See System: Play/Record: Alternate stop keys (RW) (SV183) for more information.
To resume after a pause, the caller must press the pause key again. If the caller does not resume after pressing the pause key (by pressing the pause key again), playing continues when the pause times out. The pause time out is configurable using the Play/Record Voice Maximum Pause (seconds) system parameter in the Blueworx Voice Response parameter group. The default value is 10 seconds.
When interrupt by voice detection is active, the caller can interrupt PlayVoiceSegment by speaking.
If a fax tone is detected, the action is terminated.
All user input and other events are flushed both before this action starts, and when it completes. As a result, any queued DTMF, voice interrupt detection, or fax tones are lost.
PlayVoiceSegment can be used with background music to produce a voice-over effect. If you don't want background music playing at the same time as the segment, precede this action with a ControlMusic action and set the fade time to 100.
You can only play a voice segment from Voice in Workspace if you created it with RecordVoiceSegment in your current session and have not saved it. The temporary workspace is cleared when you end the session.
The parameters for PlayVoiceSegment identify the voice segment to play and where it is located. This action plays a voice segment either from workspace (Voice in Workspace) or from disk (Voice on Disk). If the voice data is in workspace, there are no parameters. If the segment is stored on disk, the parameters are:
PlayVoiceSegment can have one of the following results:
The system variable System: Action additional information (SV180) is set to one of the following values:
When using an ASCII editor, code this action with these parameters in the following order:
Or:
Or:
For example:
label: "Check Edges" PlayVoiceSegment("IN_WORKSPACE") edge EDGE_PLAYVCE_COMPLETED: completed edge EDGE_PLAYVCE_LINE_PROBLEM: line_problem edge EDGE_PLAYVCE_NOT_FOUND: not_found edge EDGE_HUP: hup ; PlayVoiceSegment("ON_DISK", "VDIR_NAME", System, loc1_n, SV142); # SV142...App Profile Language
The parameters and edges are described above under "Parameters" and "Possible results". For more information, see Testing a state table using the debugger.