Loopback ('What u hear') recording in Python using PyAudio

只愿长相守 提交于 2019-12-04 10:40:16

EDIT: I didn't see the cross-platform thing. Leaving this as a reference to the loopback device for Windows.

Install a virtual loopback device like [1] and select the adapter as your input device. That works for me very well.

You can check that with pyAudio like so:

>>> print p.get_device_count()
8

>>> print p.get_device_info_by_index(1)["name"]
Line 1 (Virtual Audio Cable)

So, I use 1 as my device_index.

[1] http://virtual-audio-cable.en.softonic.com/

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