首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在使用蓝牙耳机的同时使用python声音设备录制系统音频?

如何在使用蓝牙耳机的同时使用python声音设备录制系统音频?
EN

Stack Overflow用户
提问于 2022-05-06 03:00:44
回答 1查看 343关注 0票数 0

我正在使用python声音设备在Windows上录制系统音频。通常,我可以使用"(Realtek HD音频立体声输入),Windows WDM-KS (2 in,0 out)“来获取系统声音。

但是在通过蓝牙连接到我的耳机后,我不能再记录系统播放的声音了。下面列出了所有检测到的设备python声音设备。

0 Microsoft声音映射器-输入,MME (2 in,0 out) 1麦克风(Realtek高清Au,MME (2 in,0 out) 2电缆输出(VB-音频虚拟,MME (2英寸,0外) 3线1(虚拟音频电缆),MME (2英寸,0外) 4 Microsoft声音映射器-输出,MME (0 in,2 out) 5 ComfoBuds耳机(1 1MORE立体声),MME (0 in,2 out) 6扬声器(Realtek高清Au,MME (0 in,2 out) 7 Realtek数字输出(Realtek,MME (0 in,2 out) 8线路1(虚拟音频电缆),MME (0 in,2 out) 9电缆输入(VB-音频虚拟C,MME (0 in,2 out) 10主声音捕获驱动程序,Windows主声音捕获驱动程序(2 in,0 out) 11麦克风(Realtek高清音频),Windows麦克风(2 in,0 out) 12电缆输出(VB-音频虚拟电缆),Windows DirectSound (2 in,0 out) 13行1(虚拟音频电缆),Windows DirectSound (2 in,0 out) 14主声音驱动程序,Windows主声音驱动程序(0 in,2 out) 15 ComfoBuds DirectSound耳机(1 1MORE耳机) (0 in,2 out) 16扬声器(Realtek高清音频),Windows扬声器(0 in,2 out) 17 Realtek数字输出(Realtek高清音频),Windows DirectSound (0 in,2 out) 18行1(虚拟音频电缆),Windows DirectSound (0 in,2 out) 19电缆输入(VB-音频虚拟电缆),Windows DirectSound (0 in,2 out) 20扬声器(Realtek高清音频),Windows (0 in,2 out) 21 Realtek数字输出(Realtek高清音频),Windows WASAPI (0 in,2 out) 22行1(虚拟音频电缆),Windows WASAPI (0 in,2 out) 23 ComfoBuds耳机(1 1MORE立体声),Windows (0 in,2 out) 24电缆输入(VB-音频虚拟电缆),Windows (0 in,2 out) 25电缆输出(VB-音频虚拟电缆),Windows WASAPI (2 in,0 out) 26行1(虚拟音频电缆),Windows WASAPI (2 in,0 out) 27麦克风(Realtek高清音频),Windows (2 in,0 out) 28线路(),Windows KS (2 in,0 out) 29线外(虚拟电缆1),Windows WDM-KS (0 in,8 out) 30 Mic 1(虚拟电缆1),Windows WDM-KS (8英寸,0外) 31线(虚拟电缆1),Windows WDM-KS (8 in,0 out) 32 S/PDIF 1(虚拟电缆1),Windows WDM-KS (8英寸,0外) 33立体声混音(Realtek HD音频立体输入),Windows KS (2 in,0 out) 34个扬声器(Realtek HD音频输出),Windows WDM-KS (0 in,2 out) 35麦克风(Realtek音频Mic输入),Windows KS (2 in,0 out) 36 SPDIF Out (Realtek HDA SPDIF Out),Windows WDM-KS (0 in,2 out) 37电缆输出(VB),Windows KS (8英寸,0输出) 38个扬声器(VB),Windows KS (0 in,8 out) 39输出(@System32\drivers\bthhfenum.sys,#4;%1手动高频音频%0 ;(有一头老母猪)),Windows KS (0 in,1 out) 40输入(@System32\drivers\bthhfenum.sys,#4;%1手动高频音频%0 ;(有一头老母猪)),Windows KS (1 in,0 out) 41耳机(),Windows KS (0 in,2 out)

我试过每一种设备,但我不能从其中任何一种设备录制系统音频。

那么,我如何在使用蓝牙耳机的同时,用python音响设备录制系统音频呢?

EN

回答 1

Stack Overflow用户

发布于 2022-07-21 17:53:26

在Windows上,您需要设置一个virtual device来记录输出的音频。

我知道您问过如何使用python-sounddevice来完成这个任务,但是作为一种选择,请看一下这是PyAudio的叉。它将PortAudio库添加到PyAudio中,这将允许您选择一个输出设备并将其用作输入(又名loopback)。

这个例子将向您展示如何使用它。。有了它,在我的机器上,我可以使用Speakers (Realtek(R) Audio)作为输入设备。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72135701

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档