PyAudio ErrNo Input Overflowed -9981

為{幸葍}努か 提交于 2019-12-06 22:30:34

问题


I was getting the same error as the user in

Python, Error audio Recording in 16000Hz using Pyaudio

The error was the same (except for the line numbers) as in the below graphic:

As I was writing this, I found the solution to my problem in this link. The solution was to up the bitrate to 48000. But I had already "been approved" at 44100

if p.is_format_supported(44100.0,  # Sample rate
    input_device=devinfo["index"],
    input_channels=devinfo['maxInputChannels'],
    input_format=pyaudio.paInt16):
print 'Yay!'

Does anyone know why I was approved at 44100 and was overflowing but it works fine at 48000? (I was also approved for 48000).

Ordinarily I am the type of guy to get the solution and move on, but this time, I feel that I need to know. Thank you for your time.


回答1:


Please verify that the device actually support 44.1. Even though the device states it does support it, it's not always actually supporting it.



来源:https://stackoverflow.com/questions/14650900/pyaudio-errno-input-overflowed-9981

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!