C# UWP 从 DirectShow 源过滤器 dll 捕获视频/音频

发布于 2025-01-13 17:06:07 字数 614 浏览 4 评论 0原文

我正在尝试使用适用于 UWP 的 C# Windows.Media.Capture 来捕获音频(我假设)。 我尝试使用 DeviceInformation.FindAllAsync(DeviceClass.All); 列出所有设备,以使用 MediaCaptureInitializationSettings 中的设备 ID,但我无法找到虚拟设备(DirectShow 源)过滤器),这意味着它仅列出物理连接到系统的设备。 我正在使用 UWP 进行 Windows.Media.SpeechRecognition,但我找不到任何方法让它识别音频文件或字节流,所以我尝试让它使用虚拟源过滤器 dll 作为音频输入设备。

那么,有什么方法可以初始化 MediaCapture 来记录虚拟过滤器或让 Windows 认为它​​是(虚拟过滤器)连接的设备? 我使用的是 Windows.Media.SpeechRecognition,因为它是免费的并且效果最好(我已经尝试过其他免费库)。

我想避免做的是下载需要安装的第三方程序。 我想知道可以更改 Windows.Media.SpeechRecognition 的默认源的任何替代方案。

I am trying to capture audio by using C# Windows.Media.Capture which is for UWP (I assume).
I tried listing all devices with DeviceInformation.FindAllAsync(DeviceClass.All);, to use the device ID in MediaCaptureInitializationSettings, but I am unable to find the virtual devices (DirectShow source filters), meaning that it only lists the devices which are physically connected to the system.
I am using UWP for Windows.Media.SpeechRecognition, and I can't find any way to make it recognize audio files or byte streams, so I am trying to make it use a virtual source filter dll as an audio input device.

So, is there any way with which I can initialize MediaCapture that records the virtual filter or make windows think that it's (virtual filter) a connected device?
I am using Windows.Media.SpeechRecognition as it's only free and works best (I have tried other free libraries).

What I want to avoid doing is downloading a third-party program that requires installation.
I would like to know any alternatives with which I can change the default source for Windows.Media.SpeechRecognition.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文