0

I am trying to record some audio using pyaudio but whenever it goes through the recording loop a second time I get this error

OSError: [Errno Input overflowed] -9981

I did some searching and found that in order to solve this problem you simply need to set the 'exception_on_overflow' parameter of pyAudio.read() to False. So I did that and then I get this error

TypeError: read() got an unexpected keyword argument 'exception_on_overflow'

this doesn't make any sense to me as to why it is 'unexpected' because in the PyAudio documentation it shows that it is a valid parameter for that function so is there anyone out there can tell me how to fix this problem? Thank you

sharpchain
  • 355
  • 2
  • 7
  • 15

1 Answers1

0

I found a solution to my problem. So first I ran the command

sudo pip install pyaudio 

Which installed version 0.2.11 of pyaudio. I looked in the code and I saw that it has the exception_on_overflow parameter in the read function. I tested it in my code and it worked! I hope this solves the problem for anyone else that has it

sharpchain
  • 355
  • 2
  • 7
  • 15