Python Forum
PyAudio throwing Input overflowed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyAudio throwing Input overflowed
#1
Hello everyone,

I am trying out pyaudio with python3.
I am following the example provided at this link to record audio with pyaudio.

https://realpython.com/playing-and-recor...nd-python/

However, when I try to execute it without making any changes at all, I get

Error:
Traceback (most recent call last): File "./test_pyaudio_recording.py", line 25, in <module> data = stream.read(chunk) File "/usr/lib/python3/dist-packages/pyaudio.py", line 608, in read return pa.read_stream(self._stream, num_frames, exception_on_overflow) OSError: [Errno -9981] Input overflowed
Any possible work around to this?

Thanks in advance,
G.
Reply
#2
Please use proper code tags while posting a thread, see BBCode to know more.
pyzyx3qwerty
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs
Reply
#3
I read in few posts to try to increase the chunk size.
I was about to give up when I saw that even a value equal to 65535 was not giving any benefit.

I tried to double that up, and with a chunk size equal to 131072 it works...

Is this the expected behaviour?

...I thought that was somehow a solution but it is not..

The issue still exists...

any idea?

thanks.
Reply
#4
I dropped the bitrate down to 22050 monochannel, and it doesnt overflow anymore.

But I still don't understand how to proceed if I want to stick to the 44100.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  json loads throwing error mpsameer 8 587 Jan-23-2024, 07:04 AM
Last Post: deanhystad
  pyaudio seems to randomly halt input. elpidiovaldez5 2 311 Jan-22-2024, 09:07 AM
Last Post: elpidiovaldez5
  pywin32 Illustrator Throwing Exception Error matthewsjc1 7 5,403 Aug-27-2021, 02:43 AM
Last Post: Larz60+
  Not getting response from pyaudio OceansBlue 1 2,584 Jul-03-2021, 06:22 AM
Last Post: OceansBlue
  help with PyAudio Leo12143 1 1,888 Jan-18-2021, 09:56 AM
Last Post: DT2000
  pyAudio playing variable Talking2442 3 2,959 Dec-01-2020, 06:20 PM
Last Post: Talking2442
  Pyaudio Souls99 7 3,463 Oct-05-2020, 04:06 PM
Last Post: Larz60+
  PyAudio [Errorno -9999] Unanticipated Host Error iMuny 5 5,557 Sep-21-2020, 06:58 PM
Last Post: jefsummers
  PyAudio Buffer Data Calculation MclarenF1 0 2,100 Aug-21-2020, 10:55 AM
Last Post: MclarenF1
  Using pyaudio to stop recording under certain sound threshold Twanski94 2 6,300 Jun-13-2020, 11:35 AM
Last Post: Twanski94

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020