dwks / silvius

Kaldi-based speech recognition system + grammar
http://voxhub.io/silvius
BSD 2-Clause "Simplified" License
100 stars 28 forks source link

Review: Update to re-sample internally instead of externally #2

Closed jasonleekennedy closed 7 years ago

jasonleekennedy commented 7 years ago

Code/function review:

Code works wonderfully for my Logitech headset, but not my internal microphone in my laptop.

My internal laptop mic crashes almost immediately with [Errno Input overflowed] -9981. It would be nice if this could be tested with some other hardware to determine if this is a larger issue or something special with my hardware.

dwks commented 7 years ago

I tested the resampling code. I also get errno -9981 immediately with any of my microphones that do not support 16K audio natively. It's an issue with not specifying frames_per_buffer in the pa.open() constructor. I have a patch which I'll commit after your commit.

This pull request actually contains three commits, I'm just going to merge the first one for now. This proved very useful to me, even the basic test program was failing: http://stackoverflow.com/questions/21730667/error-doing-speech-recognition-with-pygsr https://www.raspberrypi.org/forums/viewtopic.php?t=63136&p=468103

dwks commented 7 years ago

Merged. Please rebase on top of master to get ethereal's run.sh commit, and let me know when I should test the audio_gate stuff again. Thanks a lot, this seems to fix the biggest outstanding silvius bug! :)