hark javascript

Solutions on MaxInterview for hark javascript by the best coders in the world

showing results for - "hark javascript"
Ida
25 Jun 2018
1  var hark = require('../hark.js')
2
3  var getUserMedia = require('getusermedia')
4
5  getUserMedia(function(err, stream) {
6    if (err) throw err
7
8    var options = {};
9    var speechEvents = hark(stream, options);
10
11    speechEvents.on('speaking', function() {
12      console.log('speaking');
13    });
14
15    speechEvents.on('stopped_speaking', function() {
16      console.log('stopped_speaking');
17    });
18  });
Luka
24 Aug 2018
1var speech = hark(stream, options);
2speech.on('speaking', function() {
3  console.log('Speaking!');
4});