用于外部接口的 Pyaudio (Mac OSX)
使用Python和PyAudio,我似乎无法从外部音频接口(RME Fireface)将声音录制到wav文件,但我可以使用iMac上的内置麦克风来做到这一点。我在系统偏好设置中将默认设备设置为 Fireface,当我运行代码时,会创建 wav 文件,但播放时没有声音。代码在 PyAudio 网页上给出。有什么办法可以纠正这个问题吗?
Using Python and PyAudio, I can't seem to record sound to a wav file from an external audio interface (RME Fireface), but i am able to do so with the in built mic on my iMac. I set the default device to Fireface in System preferences, and when i run the code, the wav file is created but no sound comes out when i play it. The code is as given on the PyAudio webpage. Is there any way to rectify this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在黑暗中拍几张照片 - 验证您是否正确打开设备 - 看起来 Fireface 可以是半双工或全双工(首选窗格可配置?),并且 pyaudio 显然关心(即,如果您无法指定输出,指定一个输入,反之亦然。)
要检查的另一件事是音频路由 - 在 /Applications/Utilities/Audio Midi Setup.app 下,具体取决于信号传入的方式,您可能会连接到错误的信号并且没有意识到它。
A couple shots in the dark - Verify if you're opening the device correctly - looks like the Fireface can be both half or full duplex (pref pane configurable?), and pyaudio apparently cares (i.e. you can't specify an output if you specify an input or vise versa.)
Another thing to check out is the audio routing - under /Applications/Utilities/Audio Midi Setup.app, depending on how you have the signals coming in you might be connecting to the wrong one and not realizing it.