javaRhino — Java Quick Start

  • Speech-to-Intent Engine
  • Domain Specific NLU
  • Offline NLU
  • Local Voice Recognition
  • Linux
  • macOS
  • Windows
  • Java


  • Java 11+


  • Linux (x86_64)
  • macOS (x86_64)
  • Windows (x86_64)

Cloning the Repository

If using SSH, clone the repository with:

git clone [email protected]:Picovoice/rhino.git

If using HTTPS, then type:

git clone


Build the executable demo JARs with Gradle:

cd rhino/demo/java
./gradlew build


Navigate to the output directory to use the demos:

cd rhino/demo/java/build/libs

File Demo

The file demo uses Rhino to get an inference result from an audio file. This demo is mainly useful for quantitative performance benchmarking against a corpus of audio data. Note that only the relevant spoken command should be present in the file and no other speech. There also needs to be at least one second of silence at the end of the file.

java -jar rhino-file-demo.jar -i ${AUDIO_PATH} -c ${CONTEXT_PATH}

Microphone Demo

The microphone demo opens an audio stream from a microphone and performs inference on spoken commands:

java -jar rhino-mic-demo.jar -c ${CONTEXT_PATH}

It is possible that the default audio input device is not the one you wish to use. There are a couple of debugging facilities baked into the demo application to solve this. First, type the following into the console:

java -jar rhino-mic-demo.jar -sd

It provides information about various audio input devices on the box. On a Windows PC, this is the output:

Available input devices:
Device 0: Microphone Array (Realtek(R) Au
Device 1: Microphone Headset USB

You can use the device index to specify which microphone to use for the demo. For instance, if you want to use the Headset microphone in the above example, you can invoke the demo application as below:

java -jar rhino-mic-demo.jar -c ${CONTEXT_PATH} -di 1

If the problem persists we suggest storing the recorded audio into a file for inspection. This can be achieved with:

java -jar rhino-mic-demo.jar -c ${CONTEXT_PATH} -di 1 -o ./test.wav

If after listening to stored file there is no apparent problem detected please open an issue.

Issue with this doc? Please let us know.