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,

1 Answer 1


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 agree to our terms of service and acknowledge you have read our privacy policy.

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