Skip to content

parula-app/bumblebee-hotword-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BumbleBee Hotword for NodeJS

screenshot

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.

Examples

  • Basic Example - most simple example possible
  • Full Example - all options available, plays a sound when a hotword is detected

Install

Using npm:

npm install bumblebee-hotword-node

Quick Start

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();

Hotwords

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.

Sensitivity

Hotword detection sensitivity (0.0 to 1.0) is configurable only before the first call to bumblebee.start()

bumblebee.setSensitivity(0.8);

Disable BumbleBee

Use the stop() method to disable the microphone and all processing:

bumblebee.stop();

Audio Data

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);
});

Run Examples Locally

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:

License

This repository is licensed under Apache 2.0. See Porcupine for more details.

About

BumbleBee Hotword for NodeJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%