Prerecorded messages
The expected location for prerecorded audio files follows this format:
basePath/language/prompts/library/channel/
Where:
- basePath is the path to where the client application expects to find all required audio files; for example,
http://webserver:8080/myContent
- language is a directory named after the appropriate short language code (for example,
en-US
,fr-CA
) - The constant name
prompts
(this allows you to store grammars on the same server) - library is the value
default
- channel is the name of the channel with any non-alphanumeric characters stripped (for example,
IVRVoiceVA
, notIVR/Voice VA
)—usedefault
for audio files that apply to all channels
Mix.dialog can generate filenames for your messages. When Mix builds the dialog model for an application, it uses Audio File ID as the base filename for messages. If Audio File ID is not defined, Mix falls back to Message ID. For more information, see Generate audio file IDs.
The filename extension—.wav
(default), .vox
, or .ulaw
—is set in your project settings.
VoiceXML Connector automatically appends the version
query parameter, which refers to a specific Dialog build. (Mix generates a unique version number for each deployment.) Example: http://webserver:8080/myContent/en-US/prompts/default/IVRVoiceVA/promptName.wav?version=1.0_123456789
In the absence of a new Dialog build, VoiceXML Connector lets you explicitly specify version
with an arbitrary value to make sure your VoiceXML application uses the latest version of a resource—in this case, an audio file—instead of any cached version. For more information, refer to the VoiceXML Connector documentation.
Dynamic message references
Dialog designs that support the Audio Script modality also support dynamic audio file references in messages. Rather than have the message point to a fixed audio file, a data access node is used to retrieve a reference to an audio file, whether from the client application, or from an external data store or endpoint. For more information, see DynamicMessageReference schema.
Dynamic messages
Mix.dialog gives you the flexibility to use HTML markup in Rich Text messages, and SSML tags in TTS and Audio Script messages. You can also create dynamic messages by adding placeholders (annotations) to be replaced at runtime based on what the user said or other circumstances. See Message operations and Dynamic messages for more information.
Use the same directory structure as described above. For a message that contains dynamic data along with static text, the Dialog build references separate audio files with a suffix, such as _01
, _03
, and so on, appended to the base filename.
For example, consider this audio script message:
At runtime, the Dialog service represents this dynamic message in separate parts:
- The first part references a recorded audio file for the start of the message.
- Other parts reference silence audio files, and a recorded audio file for the value of
qty
(“5”, in this example), to be fetched from the appropriated dynamic concatenated audio package. - The last part references a recorded audio file for the end of the message.
Notice the separate parts in this runtime representation of the same dynamic message for audio playback:
"audio": [{
"text": "Adding ",
"mask": false,
"bargeInDisabled": false,
"uri": "en-US/prompts/default/IVRchannel/Report_quantity_added_ini_01_01.wav?version=preview_1.0_1634153564362"
}, {
"text": "",
"mask": false,
"bargeInDisabled": false,
"uri": "en-US/prompts/default/IVRchannel/cpr/silence.natnum.precpr.wav?version=preview_1.0_1634153564362"
}, {
"text": "",
"mask": false,
"bargeInDisabled": false,
"uri": "en-US/prompts/default/IVRchannel/cpr/silence.global.natnum.wav?version=preview_1.0_1634153564362"
}, {
"text": "5",
"mask": false,
"bargeInDisabled": false,
"uri": "en-US/prompts/default/IVRchannel/cpr/m.natnum.units05.wav?version=preview_1.0_1634153564362"
}, {
"text": "",
"mask": false,
"bargeInDisabled": false,
"uri": "en-US/prompts/default/IVRchannel/cpr/silence.global.natnum.wav?version=preview_1.0_1634153564362"
}, {
"text": "",
"mask": false,
"bargeInDisabled": false,
"uri": "en-US/prompts/default/IVRchannel/cpr/silence.natnum.postcpr.wav?version=preview_1.0_1634153564362"
}, {
"text": " units to your order",
"mask": false,
"bargeInDisabled": false,
"uri": "en-US/prompts/default/IVRchannel/Report_quantity_added_ini_01_03.wav?version=preview_1.0_1634153564362"
}
]
See Message actions, in the Dialog as a Service gRPC API documentation, for more information.
Dynamic concatenated audio packages
Annotations that represent variables or entities of certain types (date, time, temperature, and so on) support output formatting. At runtime, some VoiceXML applications can play Audio Script messages by using audio files identified in a package via the proprietary Nuance CPR algorithm for dynamic concatenated audio. If a recorded audio file cannot be found in the recorded audio package, TTS playback is used as a fallback. References to files located in dynamic concatenated audio packages have the same format with the addition of the /cpr
subdirectory before the prompt name, as shown in this example:
http://webserver:8080/myContent/en-US/prompts/default/IVRVoiceVA/cpr/silence.global.date.wav?version=1.0_123456789
For more information, including on the formatting options available for the Audio Script, TTS, and Rich Text modalities, see Output formatting options. Note that support for dynamic concatenated audio is limited to specific languages.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.