Skip to content
Jean-Philippe Gariépy edited this page Apr 25, 2015 · 2 revisions

The Pause audio item is a way to generate a pause (i.e. a element in VoiceXML). The duration of the pause must be specified with a Duration which has some factory methods.

Dialogue.java:

//Play a half-second pause
Message message = new Message("pause",
                              new SpeechSynthesis("This example shows how to"),
                              new Pause(Duration.milliseconds(500)),
                              new SpeechSynthesis("play a pause."));
DialogueUtils.doTurn(message, context);

Running this example

You can download or browse the complete code for this example at GitHub.This is a complete working application that you can build and run for yourself.

You can also clone the Rivr Cookbook repository and checkout this example:

git clone -b message-pause git@github.com:nuecho/rivr-cookbook.git

Then, to build and run it:

cd rivr-cookbook

./gradlew jettyRun

The VoiceXML dialogue should be available at http://localhost:8080/rivr-cookbook/dialogue

To stop the application, press Control-C in the console.