PyAudio Input Overflowed -9981 - No solution working

后端 未结 5 2019
慢半拍i
慢半拍i 2021-01-14 12:07

Please do not report this question as a duplicate, because none of the already available Solution working for me, I tested them all

So, I am trying

5条回答
  •  南方客
    南方客 (楼主)
    2021-01-14 12:40

    Did you try setting exception_on_overflow to False? From the Pyaudio documentation:

    read(num_frames, exception_on_overflow=True)
    

    Read samples from the stream. Do not call when using non-blocking mode.

    Parameters: num_frames – The number of frames to read. exception_on_overflow – Specifies whether an IOError exception should be thrown (or silently ignored) on input buffer overflow. Defaults to True. Raises IOError: if stream is not an input stream or if the read operation was unsuccessful. Return type:
    string

提交回复
热议问题