Java Quick Start
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (x86_64)
- NVIDIA Jetson Nano
- Raspberry Pi (2, 3, 4)
- Picovoice Account and AccessKey
- Java 11+
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your
Make sure to keep your
Install JDK 11+ .
Install the Java binding from the Maven Central Repository at:
Create an instance of Picovoice that uses a Porcupine keyword file , and a Rhino context file :
Pass in frames of audio to the
Release resources explicitly when done with Picovoice:
Custom Wake Words & Contexts
Create custom contexts using the Picovoice Console . Download the custom Porcupine keyword (
.ppn) and Rhino context (
.rhn) files and create an instance of Picovoice using the
.setContextPath build methods.
Use the corresponding model file (
.pv) to process non-English wake words and contexts.
The model files for all supported languages are available
on the Porcupine and Rhino GitHub repositories.
Pass in the Porcupine model file using the
setPorcupineModelPath build method and the Rhino model file using the
setRhinoModelPath to change the detection language:
For the Picovoice Java SDK, we offer demo applications that demonstrate how to use the end-to-end speech recognition engine on real-time audio streams (i.e. microphone input) and audio files.
- Clone the Picovoice repository from GitHub:
- Build the Picovoice Java demo using
To see the usage options for the demos, use the
Ensure you have a working microphone connected to your system and run the following command to make inferences based on the given keyword and context files:
For more information on our Picovoice demos for Java, head over to our GitHub repository .