I'm getting an input overflow error using pyaudio with sample rate of 16000 and frame per buffer of 1024. I'm also using a USB microphone and a raspberry pi 3 (raspbian). I'm using pyaudio for pocketsphinx and it works fine but stops with input overflow after a few seconds.

 p = pyaudio.PyAudio()
   stream = p.open(format=pyaudio.paInt16,
   channels=1, rate=16000, input=True,

I had the same issue and it seems to be due to an overflow of the buffer. Try increasing the size of the buffer to 2*1024 or 4*1024. I hope this helped

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.