播放音频作为麦克风输入 [英] Play audio as microphone input

查看:127
本文介绍了播放音频作为麦克风输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要测试语音识别程序.有些是我可以访问代码的,有些是我不能访问的.

I am to test voice recognition programs. Some which I have access to the code and others where I don't.

遗憾的是,我的(美丽的)声音并不完美,所以当我阅读文本时,每次听起来都略有不同.这使得测试变得困难和耗时.鉴于我可以调整很多参数.

Sadly my (beautiful) voice is not perfect, so when I am reading a text it sounds slightly different each time. Which makes the testing difficult and time consuming. Giving that I can tweak a lot of parameters.

所以我想知道是否有办法录制我自己的声音(已经完成).然后将其作为普通麦克风输入播放,以便我正在测试的语音识别程序将其视为麦克风输入.

So I was wondering if there was a way to record my own voice (already done). And then play it as normal microphone input so the voice recognition program I am testing will see it as microphone input.

如果可以在 C# 中以编程方式完成,这也会有很大帮助.所以我可以在我自己的代码中指定什么时候玩什么.

This would also help greatly if it could be done programatically in C#. So I can in my own code specify when to play what.

从扬声器播放并让语音识别程序收听麦克风不是一种选择,因为不同的计算机/扬声器/麦克风上的声音不同.

To play it from speakers and have the voice recognition programs listen to the microphone is not an option, because it is not the same sound on different computers/speakers/microphones.

谢谢.

到目前为止我发现的是使用软件声卡模拟器.但是一直没找到合适的.

What i have found so far is to use a software sound Card simulator. But I haven't been able to find a suitable one.

推荐答案

就像有些打印机驱动程序根本不连接打印机而是写入 PDF 文件一样,类似地,也有可用的虚拟音频驱动程序不连接打印机完全连接到物理麦克风,但可以通过管道从其他来源(例如文件或其他程序)输入.

Just as there are printer drivers that do not connect to a printer at all but rather write to a PDF file, analogously there are virtual audio drivers available that do not connect to a physical microphone at all but can pipe input from other sources such as files or other programs.

我希望我推荐免费/捐赠软件不会违反任何规则,但是VB-Audio Virtual Cable 应该让您创建一对虚拟输入和输出音频设备.然后您可以将 MP3 播放到虚拟输出设备中,然后将虚拟输入设备设置为您的麦克风".从理论上讲,我认为这应该可行.

I hope I'm not breaking any rules by recommending free/donation software, but VB-Audio Virtual Cable should let you create a pair of virtual input and output audio devices. Then you could play an MP3 into the virtual output device and then set the virtual input device as your "microphone". In theory I think that should work.

如果所有其他方法都失败了,您可以随时推出自己的虚拟音频驱动程序.Microsoft 提供了一些示例代码,但遗憾的是它不适用于较旧的 Windows XP 音频模型.可能也有适用于 XP 的示例代码.

If all else fails, you could always roll your own virtual audio driver. Microsoft provides some sample code but unfortunately it is not applicable to the older Windows XP audio model. There is probably sample code available for XP too.

这篇关于播放音频作为麦克风输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆