質問

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.

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.

Thanks.

Edit: 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.

役に立ちましたか?

解決

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.

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.

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.

他のヒント

A solution not requiring specialized software can be obtained with the "Listen to device" capability in Windows:

  1. Open the setting of one your microphone devices and enable "Listen to device", select your current output device from the list.
  2. Playback audio on that same output device
  3. The mic signal equals the output signal

Original solution by reddit user osyu: https://www.reddit.com/r/obs/comments/aoinga/use_obs_audio_output_as_a_microphone_source/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top