Step 5: Localize the default system prompts
Voice Platform defines several prompts played when various events occur. These are:
- A default system error prompt played when errors occur at the platform level or errors are not handled by the application.
- A prompt played if a help event is thrown and not handled by the application. This occurs if the application has enabled the “help” universal but has not explicitly provided a handler for a help event.
- A prompt played if a nomatch event is thrown and not handled by the application. This event is thrown if the user’s utterance cannot be recognized by the current active grammars.
- A prompt played if a maxspeechtimeout event is thrown. This occurs if the user speaks for too long. The maximum length of a single utterance is controlled by the VoiceXML property maxspeechtimeout.
System prompt settings
Each of these prompts is specified through a Voice Browser service property as shown in the table:
|
Prompt type |
Voice Browser service property |
Default prompt (in English) and filename |
|---|---|---|
|
System error |
browser.systemErrorPrompt |
Prompt: “Sorry, but it looks like we’re having some technical difficulties right now, so please try calling back later. We apologize for any inconvenience. Goodbye.” Filename: system_error.wav |
|
Help event |
voicexml.helpHandlerPrompt |
Prompt: “Sorry, but I can’t get you any help information right now.” Filename: help.wav |
|
maximum speech timeout event |
voicexml.maxspeechtimeoutHandlerPrompt |
Prompt: “Sorry, I didn’t get that.” Filename: maxspeechtimeout.wav |
|
No match event |
voicexml.nomatchHandlerPrompt |
Prompt: “Sorry, I didn’t get that.” Filename: nomatch.wav |
System prompt location
The default system prompts are located in %NSSSVRSDK%\master\vbs_basepath\lang\en-US\prompts. %NSSSVRSDK% is the location of the Nuance Speech Server. To use localized system prompts:
- Record new system prompts in the desired language. Keep the same filenames as the defaults: system_error.wav, help.wav, nomatch.wav, and maxspeechtimeout.wav.
- Create a new prompts directory that indicates the locale: %NSSSVRSDK%\session\vbs_basepath\lang\locale\prompts.
For example, the location for Canadian French system prompts would be: %NSSSVRSDK%\session\vbs_basepath\lang\fr-CA\prompts.
- Copy your localized prompts here.
- Make sure browser.primaryLocale on the Voice Browser service is set to the this locale. This tells Voice Platform to look relative to the locale directory for the system prompts.
- By default, if a system prompt fails to play for any reason (file is missing or a port is down), the Voice Browser service plays the TTS version of the default English prompt. Voice Platform provides four “fallback” service properties where you can specify new text to match your localized system prompts. (This step is optional since it is very rare that Voice Platform would need to play the TTS.) Set these service properties on the Advanced tab of the Voice Browser service to the new text:
Note: If you change the default prompt filenames or copy them to different location than the one described in these instructions, you must set the service properties to the location and name of a recorded prompt file, or to the name of a handler class that generates the correct prompt. See the table in System prompt settings.