public class PicovoiceManager
extends java.lang.Object
Picovoice, and notifies the client upon detection
of the wake word or completion of in voice command inference.| Modifier and Type | Class and Description |
|---|---|
static class |
PicovoiceManager.Builder
Builder for creating an instance of PicovoiceManager with a mixture of default arguments
|
| Constructor and Description |
|---|
PicovoiceManager(android.content.Context appContext,
java.lang.String porcupineModelPath,
java.lang.String keywordPath,
float porcupineSensitivity,
PicovoiceWakeWordCallback wakeWordCallback,
java.lang.String rhinoModelPath,
java.lang.String contextPath,
float rhinoSensitivity,
PicovoiceInferenceCallback inferenceCallback)
Private constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
start()
Starts recording audio from teh microphone and processes it using $
Picovoice. |
void |
stop()
Stops recording audio from the microphone.
|
public PicovoiceManager(android.content.Context appContext,
java.lang.String porcupineModelPath,
java.lang.String keywordPath,
float porcupineSensitivity,
PicovoiceWakeWordCallback wakeWordCallback,
java.lang.String rhinoModelPath,
java.lang.String contextPath,
float rhinoSensitivity,
PicovoiceInferenceCallback inferenceCallback)
appContext - Android app contextporcupineModelPath - Absolute path to the file containing Porcupine's model parameters.keywordPath - Absolute path to Porcupine's keyword model file.porcupineSensitivity - Wake word detection sensitivity. It should be a number within
[0, 1]. A higher sensitivity results in fewer misses at the cost
of increasing the false alarm rate.wakeWordCallback - User-defined callback invoked upon detection of the wake phrase.
$PicovoiceWakeWordCallback defines the interface of the
callback.rhinoModelPath - Absolute path to the file containing Rhino's model parameters.contextPath - Absolute path to file containing context parameters. A context
represents the set of expressions (spoken commands), intents, and
intent arguments (slots) within a domain of interest.rhinoSensitivity - Inference sensitivity. It should be a number within [0, 1]. A
higher sensitivity value results in fewer misses at the cost of
(potentially) increasing the erroneous inference rate.inferenceCallback - User-defined callback invoked upon completion of intent inference.
#PicovoiceInferenceCallback defines the interface of the
callback.public void start()
throws PicovoiceException
Picovoice.PicovoiceException - if there is an error with initialization of Picovoice.public void stop()
throws PicovoiceException
PicovoiceException - if the PicovoiceManager.MicrophoneReader throws an
exception while it's being stopped.