Giter Site home page Giter Site logo

bumblebee-deepspeech's Introduction

Bumblebee Deepspeech

Deepspeech service for Bumblebee.

Although it is not intended for anyone to use this library directly, it can be used as a miniature version of Bumblebee and this is the library upon which it relies.

Basic Usage

const BumblebeeDeepSpeech = require('bumblebee-deepspeech');

// use bumblebee-hotword-node for microphone recording
const BumbleBee = require('bumblebee-hotword-node');
const bumblebee = new BumbleBee();

// start the service with the location to your DeepSpeech 0.8.0 models
BumblebeeDeepSpeech.start({
	modelName: 'english',
	modelPath: __dirname + '/../../deepspeech-0.8.0-models', // path to deepspeech model,
	silenceThreshold: 200, // delay for this long before processing the audio
	vadMode: 'VERY_AGGRESSIVE', // options are: 'NORMAL', 'LOW_BITRATE', 'AGGRESSIVE', 'VERY_AGGRESSIVE'
	debug: true
})
.then(deepspeech => {

	// receive the speech recognition results
	deepspeech.on('recognize', (text, stats) => {
		console.log('\nrecognize:', text, stats);
	});

	// bumblebee emits a "data" event for every 8192 bytes of audio it records from the microphone
	bumblebee.on('data', function (intData, sampleRate, hotword, float32arr) {
		// stream the data to the deepspeech plugin
		deepspeech.streamData(intData, sampleRate, hotword, float32arr);
	});

	// bumblebee start the microphone
	bumblebee.start();
});

Examples

2 examples are provided:

  • microphone - simple microphone recording into DeepSpeech

  • hotword - use a hotword to turn DeepSpeech on and off

These examples require that DeepSpeech 0.8.0 models must be downloaded or soft-linked to the root of this project.

wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.pbmm
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.0/deepspeech-0.8.0-models.scorer

bumblebee-deepspeech's People

Contributors

dsteinman avatar jaxcore avatar dependabot[bot] avatar ncpleslie avatar patronics avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.