Previous Topic

Next Topic

Book Contents

Book Index

Home Page

Speak Variables

There are two pairs of eight (a total of 16) "Speak" variables that allow the Call Tree developer to deliver dynamically generated content to the user at a Node. "Speak" variables are used to deliver text-to-speech or recorded audio.

"Speak" variables are used for text-to-speech audio or to do simple wave file playback. "Speak" variables cannot be interrupted while they are delivering content. To deliver text-to-speech or wave file content that can be interrupted, refer to the section on SpeakInteractive variables and to the section on SpeakInteractiveWave variables. For more advanced wave file playback such as that required by voice mail applications, refer to the section on SpeakInteractiveWave variables.

The "Speak" variables are shown below:

Text-to-Speech Content

Recorded Audio Content

Speak1

SpeakWave1

Speak2

SpeakWave2

Speak3

SpeakWave3

Speak4

SpeakWave4

Speak5

SpeakWave5

SpeakAfterRecord1

SpeakWaveAfterRecord1

SpeakAfterRecord3

SpeakWaveAfterRecord2

SpeakAfterRecord3

SpeakWaveAfterRecord3

Delivering Text-to-Speech Generated Content with Speak Variables

To deliver audible text-to-speech generated content the developer should set the values of one or more of the Speak1, Speak2, Speak3, Speak4, Speak5, SpeakAfterRecord1, SpeakAfterRecord2, and SpeakAfterRecord3 variables.

Here's a simple example:

Speak1 = "Hello, my name is John."
Speak2 = "I am from Delaware."
Speak3 = "It's a very small state."

This content could be placed entirely in the Speak1 variable as shown here:

Speak1 = "Hello, my name is John. I am " + _
"from Delaware. It's a very " + _
"small state."

Since text-to-speech content can always be combined into a single "Speak" variable, eight available "Speak" variables may seem like overkill. The reason for the multiple "Speak" variables is to allow mixing and matching with pre-recorded audio and to reduce the need to manipulate large text strings.


Special control tags can be embedded in the text to control the pitch, speed, and other elements of the text-to-speech generation. For more information refer to the section on Dynamically Customizing Speech Output.

Delivering Recorded Audio (wav files) with Speak Variables

To deliver recorded audio content the developer should set the values of one or more of the SpeakWave1, SpeakWave2, SpeakWave3, SpeakWave4, SpeakWave5, SpeakWaveAfterRecord1, SpeakWaveAfterRecord2, and SpeakWaveAfterRecord3 variables to the name of the wave sound files to play.

For best results, always fully qualify the path and file name of the wave file in the SpeakWave variables. Consider the following example:

SpeakWave1 = "Goodbye.wav"

Active Call Center may not be able to locate this file in the current default directory; the result would be that no audio would be played. A much better specification of this wave file could be a follows (note that the text should all be one line):

SpeakWave1 = "C:\Program Files\Active Call Center\Examples\Goodbye.wav"

Wave files that are played with SpeakWave must be of an acceptable format: for most voice modems and telephony cards (including Brooktrout) they must be PCM, 8000 Hz, 8 or 16 bit mono; for most Dialogic cards the correct format is PCM, 11025 Hz, 8 bit, mono. For more details refer to the section on Recording and Modifying WAV Audio Files.

Mix and Match Text-to-Speech and Recorded Audio

"SpeakWave" and "Speak" can be mixed and matched to provide alternating text-to-speech generated audio and recorded audio as shown below.

Speak1 = "The following messages were recorded today:"
SpeakWave2 = "C:\Messages\TodaysMessage.wav"

SpeakWave3 = "C:\Messages\TodaysMessage2.wav"
Speak4 = "That concludes today's messages."

Note that only one of a matching pair of "Speak" variables will be heard: for example, if both Speak2 and SpeakWave2 are set during a Macro, only the SpeakWave2 variable will be processed.

When Speak Variables are Processed

The content of "Speak" variables is delivered to the user after the Macro has executed: therefore, the only relevant values of the "Speak" variables are the values they have at the end of the Macro. This is a subtle, but important point. Consider the following Macro:

Speak1 = "Hello, "
Speak1 = "My name is John."
Speak1 = "I am from Delaware."

Since "Speak" variables are processed after the Macro has executed, the last value of Speak1 is the only value that will count. As a result, the user will only hear "I am from Delaware." To correctly deliver the above content, the developer should write the Macro as follows:

Speak1 = "Hello, My name is John."
Speak2 = "I am from Delaware."

Another equivalent technique is to use:

Speak1 = "Hello, My name is John. I am from Delaware."

Order in which Speak Variables are Processed

After a Macro has finished executing, "Speak" variables are processed in the order shown below:

  1. Speak1 or SpeakWave1 (but not both)
  2. Speak2 or SpeakWave2 (but not both)
  3. Speak3 or SpeakWave3 (but not both)
  4. Speak4 or SpeakWave4 (but not both)
  5. Speak5 or SpeakWave5 (but not both)
  6. If there is a prompt to record audio specified in the Record or RecordWave variables, the audio recording is performed after the first 5 "Speak" variables have been processed.
  7. SpeakAfterRecord1 or SpeakWaveAfterRecord1 (but not both)
  8. SpeakAfterRecord2 or SpeakWaveAfterRecord2 (but not both)
  9. SpeakAfterRecord3 or SpeakWaveAfterRecord3 (but not both)
  10. SpeakInteractive variables.
  11. SpeakInteractiveWave variables.

Note that "SpeakAfterRecord" variables are processed even if there is no recording taking place at the Node.

See Also

Variables Used in Macros

Response Variable

GotoNode Variable

SpeakInteractive Variables

SpeakInteractiveWave Variables

Record Variables

Touch Tone Buffer Variables

Caller ID Variables

Call Information Variables

TransferCallTo Variable

PlayTouchTones Variable

SendModemCommands Variable

Node Variables

Creating Extra Global Variables