Picovoice Platform
Java Quick Start
Platforms
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (x86_64)
- Raspberry Pi (3, 4, 5)
Requirements
- Picovoice Account and AccessKey
- Java 11+
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your AccessKey
.
Make sure to keep your AccessKey
secret.
Quick Start
Setup
Install JDK 11+.
Install the Java binding from the Maven Central Repository at:
Usage
Create an instance of Picovoice that uses a Porcupine keyword file, and a Rhino context file:
Pass in frames of audio to the .process
function:
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 setKeywordPath
and .setContextPath
build methods.
Non-English Languages
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:
Demo
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.
Setup
- Clone the Picovoice repository from GitHub:
- Build the Picovoice Java demo using
Gradle
:
Usage
To see the usage options for the demos, use the -h
flag:
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.