Classes | |
class | Builder |
enum | BuiltInKeyword |
Public Member Functions | |
void | delete () |
void | delete () |
native int | getFrameLength () |
native int | getFrameLength () |
native int | getSampleRate () |
native int | getSampleRate () |
native String | getVersion () |
native String | getVersion () |
Porcupine (String accessKey, String libraryPath, String modelPath, String[] keywordPaths, float[] sensitivities) throws PorcupineException | |
int | process (short[] pcm) throws PorcupineException |
int | process (short[] pcm) throws PorcupineException |
Static Public Attributes | |
static final String | LIBRARY_PATH |
static final String | MODEL_PATH |
Private Member Functions | |
native void | delete (long object) |
native void | delete (long object) |
native long | init (String accessKey, String modelPath, String[] keywordPaths, float[] sensitivities) |
native long | init (String accessKey, String modelPath, String[] keywordPaths, float[] sensitivities) |
Porcupine (String accessKey, String modelPath, String[] keywordPaths, float[] sensitivities) throws PorcupineException | |
native int | process (long object, short[] pcm) |
native int | process (long object, short[] pcm) |
Private Attributes | |
long | handle |
final long | libraryHandle |
Static Private Attributes | |
static final HashMap< BuiltInKeyword, String > | BUILT_IN_KEYWORD_PATHS = new HashMap<>() |
static String | DEFAULT_MODEL_PATH |
static boolean | isExtracted |
static final int[] | KEYWORDS_RESOURCES |
Android binding for Porcupine wake word engine. It detects utterances of given keywords within an incoming stream of audio in real-time. It processes incoming audio in consecutive frames and for each frame emits the detection result. The number of samples per frame can be attained by calling getFrameLength(). The incoming audio needs to have a sample rate equal to getSampleRate() and be 16-bit linearly-encoded. Porcupine operates on single-channel audio.
Java binding for Porcupine wake word engine. It detects utterances of given keywords within an incoming stream of audio in real-time. It processes incoming audio in consecutive frames and for each frame emits the detection result. The number of samples per frame can be attained by calling getFrameLength(). The incoming audio needs to have a sample rate equal to getSampleRate() and be 16-bit linearly-encoded. Porcupine operates on single-channel audio.
Definition at line 35 of file android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java.
|
inlineprivate |
Constructor.
accessKey | AccessKey obtained from Picovoice Console (https://console.picovoice.ai/). |
modelPath | Absolute path to the file containing model parameters. |
keywordPaths | Absolute paths to keyword model files. |
sensitivities | Sensitivities for detecting keywords. Each value should be a number within [0, 1]. A higher sensitivity results in fewer misses at the cost of increasing the false alarm rate. |
PorcupineException | if there is an error while initializing Porcupine. |
Definition at line 64 of file android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java.
|
inline |
Constructor.
accessKey | AccessKey obtained from Picovoice Console. |
libraryPath | Absolute path to the native Porcupine library. |
modelPath | Absolute path to the file containing model parameters. |
keywordPaths | Absolute paths to keyword model files. |
sensitivities | Sensitivities for detecting keywords. Each value should be a number within [0, 1]. A higher sensitivity results in fewer misses at the cost of increasing the false alarm rate. |
PorcupineException | if there is an error while initializing Porcupine. |
Definition at line 55 of file java/src/ai/picovoice/porcupine/Porcupine.java.
|
inline |
Releases resources acquired by Porcupine.
Definition at line 67 of file java/src/ai/picovoice/porcupine/Porcupine.java.
|
inline |
Releases resources acquired by Porcupine.
Definition at line 75 of file android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java.
|
private |
|
private |
native int ai.picovoice.porcupine.Porcupine.getFrameLength | ( | ) |
Getter for number of audio samples per frame.
native int ai.picovoice.porcupine.Porcupine.getFrameLength | ( | ) |
Getter for number of audio samples per frame..
native int ai.picovoice.porcupine.Porcupine.getSampleRate | ( | ) |
Getter for audio sample rate accepted by Picovoice.
native int ai.picovoice.porcupine.Porcupine.getSampleRate | ( | ) |
Getter for audio sample rate accepted by Picovoice.
native String ai.picovoice.porcupine.Porcupine.getVersion | ( | ) |
Getter for version.
native String ai.picovoice.porcupine.Porcupine.getVersion | ( | ) |
Getter for version.
|
private |
|
private |
|
private |
|
private |
|
inline |
Processes a frame of the incoming audio stream and emits the detection result.
pcm | A frame of audio samples. The number of samples per frame can be attained by calling getFrameLength(). The incoming audio needs to have a sample rate equal to getSampleRate() and be 16-bit linearly-encoded. Porcupine operates on single-channel audio. |
PorcupineException | if there is an error while processing the audio frame. |
Definition at line 83 of file java/src/ai/picovoice/porcupine/Porcupine.java.
|
inline |
Processes a frame of the incoming audio stream and emits the detection result.
pcm | A frame of audio samples. The number of samples per frame can be attained by calling getFrameLength(). The incoming audio needs to have a sample rate equal to getSampleRate() and be 16-bit linearly-encoded. Porcupine operates on single-channel audio. |
PorcupineException | if there is an error while processing the audio frame. |
Definition at line 94 of file android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java.
|
staticprivate |
Definition at line 42 of file android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java.
|
staticprivate |
Definition at line 44 of file android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java.
|
private |
Definition at line 51 of file android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java.
|
staticprivate |
Definition at line 45 of file android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java.
|
staticprivate |
|
static |
Definition at line 33 of file java/src/ai/picovoice/porcupine/Porcupine.java.
|
private |
Definition at line 31 of file java/src/ai/picovoice/porcupine/Porcupine.java.
|
static |
Definition at line 34 of file java/src/ai/picovoice/porcupine/Porcupine.java.