Closed sharmmoh1983 closed 7 years ago
If the audio stream stops then there's nothing to keep Sonus "alive". I'm guessing that's what going on.
Could you share your code from index.js
so I can verify?
How to make sure audio stream does not stop? Because in some raspberry pi this is working and on some it is not
Can you revert as soon as possible as this is hampering our demo
Code:
const config = require('./config') const translate = require('google-translate-api'); const controller = require('./controller') const Sonus = require('sonus') const speech = require('@google-cloud/speech')({ projectId: '2017', keyFilename: '/home/pi/91efae41b5b4.json' }) const SoundPlayer = require('soundplayer');
const hotwords = [{ file: 'resources/aime.pmdl', hotword: 'aime' }] //const sonus = Sonus.init({ hotwords }, speech); const sonus = Sonus.init({ hotwords }, speech); Sonus.start(sonus) console.log('Say "' + hotwords[0].hotword + '"...'); sonus.on('hotword', (index, keyword) => { console.log("hotword triggered");
});
sonus.on('final-result', result => { console.log("UserSpeech : ", result)
}
})
Audio stream is getting stopped may be because microphone is not properly attached?
Revert? You can manually install the old version if you'd like, but I don't understand how reverting would help.
Loos like you aren't including Google cloud speech:
const speech = require('')({
projectId: '2017',
keyFilename: '/home/pi/91efae41b5b4.json'
})
It got resolved . there was some issue wit microphone Do you have any idea bout user recognition library that can be assorted with sonus Like Voice Id python equivalent. Getting user details for speech by identifying their voice
@sharmmoh1983 I haven't looked at user recognition, but feel free to file a new issue. Going to close this out because I think it's a dupe of #51
Sometimes when I run the code using command : node index.js It just exit without any information
node index.js Say amie exit