This is a stripped down and repackaged version of the excellent Porcupine wake word (hotword) system. This requires no cloud services and is freely available to use under the Apache 2.0 license (GPLv3 compatible).
This is the NodeJS version of BumbleBee. If you need hotword detection in the browser or ElectronJS see the:
BumbleBee Node starts recording the system microphone and emits an event when it hears the available hotwords.
- Basic Example - most simple example possible
- Full Example - all options available, plays a sound when a hotword is detected
Using npm:
npm install bumblebee-hotword-node
const BumbleBee = require('bumblebee-hotword-node');
const bumblebee = new BumbleBee();
bumblebee.addHotword('bumblebee');
bumblebee.on('hotword', function (hotword) {
console.log('Hotword Detected:', hotword);
});
bumblebee.start();
The hotwords available by default are:
- bumblebee
- grasshopper
- hey edison
- porcupine
The hotword that is detected can be retreived in the .on('hotword')
event:
bumblebee.on('hotword', function(hotword) {
console.log('hotword detected:', hotword);
});
To only receive a hotword event for one of the hotwords, use the setHotword()
method:
bumblebee.setHotword('hey_edison');
The Picovoice hotwords open source hotwords are freely usable under the Apache 2.0 license. Custom hotwords can be licensed from https://picovoice.ai.
Hotword detection sensitivity (0.0 to 1.0) is configurable only before the first call to bumblebee.start()
bumblebee.setSensitivity(0.8);
Use the stop() method to disable the microphone and all processing:
bumblebee.stop();
Bumblebee records audio from the microphone in 16bit/16khz PCM format and emits a stream of "data" events so the audio can be processed by other systems (such as DeepSpeech):
bumblebee.on('data', function(data) {
console.log('data', data);
});
Clone this repo, then...
For the basic example:
cd examples/basic-example
node start.js
For the full example:
cd examples/full-example
npm install
npm install speaker --mpg123-backend=openal --no-save
node start.js
For the DeepSpeech speech recognition and hotword example, see instructions at:
This repository is licensed under Apache 2.0. See Porcupine for more details.