Speech Recognition, nodeJS

I am currently working on a tool that allows me to read all of my notifications by connecting to various APIs.

It works great, but now I would like to add some vocal commands to perform some actions.

For example, when the software says “One mail from Bob,” I would say “Read” or “Archive.”

My software runs through a node server, currently I do not have any browser implementation, but it could be a plan.

What is the best way to include speech in text in node JS?

I saw a lot of threads on it, but mostly using a browser, and if possible, I would like to avoid this in the beginning. Is it possible?

Another problem is that some programs require a wav file entry. I don’t have a file, I just want my software to always listen to what I say in order to respond when I say a command.

Do you have any information on how I can do this?

Greetings

+4
source share
3 answers

To get the audio data in your application, you can try a module, for example a microphone , which I have not used with it, looks promising. This may be a way to avoid using a browser to input audio.

, IBM Watson Developer Cloud. -, , . , , () - , .

"-", , .

: IBM Watson.

+3

, node-pocketsphinx. NPM.

:

var fs = require('fs');

var ps = require('pocketsphinx').ps;

modeldir = "../../pocketsphinx/model/en-us/"

var config = new ps.Decoder.defaultConfig();
config.setString("-hmm", modeldir + "en-us");
config.setString("-dict", modeldir + "cmudict-en-us.dict");
config.setString("-kws", "keyword list");
var decoder = new ps.Decoder(config);

fs.readFile("../../pocketsphinx/test/data/goforward.raw", function(err, data) {
    if (err) throw err;
    decoder.startUtt();
    decoder.processRaw(data, false, false);
    decoder.endUtt();
    console.log(decoder.hyp())
});

readFile . :

read it /1e-20/
archive it /1e-20/

pocketsphinx . Spotting in Speech PocketSphinx

+3

, , Sonus. . (, Siri Alexa). . , say, , - :

say.speak('One mail from Bob', function(err) {
  Sonus.trigger(sonus, 1) //start listening
});

-. :
". ". " . "

Pi CHIP , , .

Simple example:
https://twitter.com/_evnc/status/811290460174041090

Something more complicated:
https://youtu.be/pm0F_WNoe9k?t=20s

Full documentation:
https://github.com/evancohen/sonus/blob/master/docs/API.md

Disclaimer: This is my project :)

+1
source

All Articles