Introducing Rivr, an open-source Java dialog engine for VoiceXML applications

RivrAfter more than a decade building the most demanding, performance-driven speech applications in the market, Nu Echo is proud to announce that it is open-sourcing its underlying Java dialog engine for VoiceXML: Rivr.

What is it?

Rivr is a lightweight application framework designed to easily create enterprise-grade VoiceXML applications. With Rivr, code is king. No Templates. No Session Management. Rivr allows the experienced developer to use all known OO concepts: abstraction, reuse, composition, modularization, aggregation. No compromise on this. And with your choice of JVM language: Java, Scala, Groovy, JPython, JRuby, Clojure, etc.

Here is a complete dialog written op top of Rivr:

SpeechRecognitionConfiguration speechRecConfig =
  new SpeechRecognitionConfiguration(
    new GrammarReference("builtin:grammar/number"));

InteractionTurn question =
    .addPrompt(new SynthesisText("Say a number."))
    .build(speechRecConfig, TimeValue.seconds(5));

VoiceXmlInputTurn answer = doTurn(context, question);

int number = Integer.parseInt(

String feedbackMessage = number + ": That's "
  + (number <= 1000 ? "a big number" : "reasonable.");

doTurn(context, new MessageTurn("feedback",
    new SynthesisText(feedbackMessage)));

return new VoiceXmlExitTurn("exit");

Nice and simple, isn’t it? Rivr completely hides all request/response handling so typical of web applications. With Rivr, your code is straightforward.

Is Rivr a toy project? Absolutely not! It is already in use by several corporate organizations and some of the most demanding speech applications in the market. It has been built by Java developers, for Java developers. Among its main features, Rivr integrates nicely with:

  • Your own workflow and tool set such as code coverage, unit tests, continuous build server, war deployment, and so on.
  • Your own testing and mocking framework including JUnit, TestNG, and Mockito (think about support for multiple environments: dev, staging, production, etc.).
  • Your favorite web application server: JBoss, Jetty, WebSphere, Weblogic, Tomcat, and the like.
  • Your own back-end, the way you want, with the tool you want (JAX-WS, JNDI, JDBC, JAX-RS).
  • Your own dependency injection framework (Spring, Guice, etc).

With Rivr, you have full control over generated VoiceXML for custom platform support. Rivr offers support for all VoiceXML primitives including DTMF, speech rec (no kidding!), recording, TTS, subdialogs, objects, scripts, transfers. It works readily on standards-compliant platforms such as Genesys GVP, Cisco CVP, Avaya Aura, and Voxeo Prophecy.

Rivr is distributed under the Apache 2 License and is hosted on github. Forking the project is only a click away. Go grab the code! And read the wiki to get started. Your contributions and comments are more than welcomed.

And what’s next?

In the upcoming weeks, we will blog more about Rivr, the philosophy that drove its design, its main features, its underlying architecture, some code recipes, and more.

Also, I will give a talk on Rivr at the SpeechTEK conference in New York, on August 19th at 1:15 (track D103).

Stay tuned!

Share this:

About the author

Dominique Boucher
I am the CTO of Nu Echo, where I am in charge of leading the technology directions and help turn customer requirements into truly effective products and solutions.

4 comments on “Introducing Rivr, an open-source Java dialog engine for VoiceXML applications”

  1. mike Reply

    Hi Rivr,
    I tried rivr with voxeo and everything worked great.
    Now, am integrating rivr-based ivr into my existing architecture, which uses different 2.1 compliant VoiceXml interpreter and I get exception below. It appears that our js interpreter chokes on parsing application.rivr.inputTurn = {};.
    This interpreter is old ( but I am not quite ready to upgrade yet.
    Any suggestions as to how to workaround the issue?
    FESI.Exceptions.EcmaScriptParseException: Syntax error detected near line 1, column 75, after “=”
    in string: ‘application.rivr.localErrorHandling = false; application.rivr.inputTurn = {};’
    FESI.Exceptions.EcmaScriptParseException: Syntax error detected near line 1, column 75, after “=”
    in string: ‘application.rivr.localErrorHandling = false; application.rivr.inputTurn = {};’
    at FESI.Interpreter.Evaluator.evaluate(
    at FESI.Interpreter.Evaluator.evaluate(
    at FESI.Data.JSWrapper.eval(
    at com.logictree.voxlinx.voicexml.domImpl.VoiceXMLScriptElementImpl.doStartTag(
    at com.logictree.voxlinx.voicexml.interpreter.VoiceXMLApplication.initialiseScripts(
    at com.logictree.voxlinx.voicexml.interpreter.VoiceXMLApplication.initialise(
    at com.logictree.voxlinx.voicexml.interpreter.VoiceXMLInterpreter.interpret(
    at com.logictree.voxlinx.interpreter.Interpreter.interpret(
    at com.logictree.voxlinx.util.ThreadPool$
    at Source)

Leave a Reply