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 });
1var speech = hark(stream, options);
2speech.on('speaking', function() {
3 console.log('Speaking!');
4});