【发布时间】:2016-05-08 12:17:53
【问题描述】:
我的系统是 ubuntu 15.10。我非常确定我的音频可以正常工作,
arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 2: ALC887-VD Alt Analog [ALC887-VD Alt Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
但是在portaudio中官方提供的可执行文件pa_devs报告0设备如下,
PortAudio version number = 1899
PortAudio version text = 'PortAudio V19-devel (built Jan 30 2016 19:22:45)'
Number of devices = 0
我可以使用 pyAudio 获取设备编号
import pyaudio
pa = pyaudio.PyAudio()
print(pa.get_default_input_device_info())
print(pa.get_device_count())
--- output ---
{'defaultHighInputLatency': 0.034829931972789115, 'maxInputChannels': 32, 'defaultLowOutputLatency': 0.008707482993197279, 'defaultLowInputLatency': 0.008707482993197279, 'defaultSampleRate': 44100.0, 'hostApi': 0, 'structVersion': 2, 'maxOutputChannels': 32, 'defaultHighOutputLatency': 0.034829931972789115, 'name': 'default', 'index': 6}
7
我应该安装一些东西还是使用一些特殊设置重新构建 portaudio?谢谢!
【问题讨论】:
标签: portaudio