Porcupine Wake Word
API Reference for the Node.js Porcupine SDK (npmjs ).
Class for the Porcupine wake word engine.
Porcupine can be initialized using the class
Resources should be cleaned when you are done using the
constructor method for Porcupine wake word engine.
accessKeystring : AccessKey obtained from Picovoice Console .
keywordsArray<string> : Absolute paths to keyword model files.
sensitivitiesArray<number> : 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.
manualModelPathstring : Absolute path to the file containing model parameters.
manualLibraryPathstring : Absolute path to Porcupine's dynamic library.
Porcupine: An instance of Porcupine wake word engine.
Processes a frame of the incoming audio stream and emits the detection result.
The number of samples per frame can be attained by
.frameLength. The incoming audio needs to have a sample rate equal
.sampleRate and be 16-bit linearly-encoded. Porcupine operates on single-channel audio.
frameArray<number> : A frame of audio samples.
number: Index of observed keyword at the end of the current frame. Indexing is 0-based and matches the ordering of keyword models provided to the constructor. If no keyword is detected then it returns -1.
The number of audio samples per frame.
The audio sample rate accepted by the Porcupine engine.
The version of the Porcupine engine.
Releases resources acquired by Porcupine