vidstige
vidstige

Reputation: 13085

Windows fake mic

I have a Windows Desktop Application written in c# and WPF. It does some recording and testing with a regular mic is cumbersome since I need to talk to the mic.

It would be awesome to be able to have a fake mic of sorts that showed up in the Recording Devices settings in Windows that would just playback a wavefile. Some might call it a mic emulator, mic simulator, or a mock mic.

If I listen to this fake mic I would hear the wave file. Hope this make sense.

I tried to goolge around and found nothing. There seems to be some Microsoft example code to achieve this, but no programs ready to install.

Are you aware of any such fake mic?

Upvotes: 11

Views: 21182

Answers (2)

Kovy Jacob
Kovy Jacob

Reputation: 1117

I have not yet tested either, but I've found these 2 which are for Windows:

Edit: I found, and ended up using, Virtual Audio Cable (VAC). I found it to be the easiest to set up. However, as it is a free trial version, after 30 minutes of running it starts saying 'trial' every 15ish seconds.

Additionally, to pipe the audio into it I used VLC. To pipe audio into VAC (or your prefered software), open VLC, press ctrl+o to open a audio file, then go to the 'Audio' tab > 'Audio device' and click on 'Line 1 (Virtual Audio Cable)'. This will route the audio output from VLC into VAC. Then, you can set VAC as an audio input.

Upvotes: 1

Ove
Ove

Reputation: 6317

Such a fake mic exists, and you don't even need code to use it. It's called Stereo Mix, but it may not be available on all sound cards. It works like this:

In the recording devices category, you have two devices: the microphone, and stereo mix.

  • When the microphone is the default, if you try to record something you will get sound from the microphone.
  • When stereo mix is the default, if you try to record something, you will get the sound that is currently playing on your computer

So, for you to get the desired effect, you would need to set Stereo Mix as the default, and play some music on your computer. The audio is passed internally, and when recording you will get exactly what is playing on your computer. It doesn't make any difference if you speak into the mic, cover it up, or unplug it altogether. You're not even using the mic, you're using stereo mix.

On my laptop, I can enable Stereo Mix from the VIA control panel (the driver for my sound card), or by using the Sound icon in Control Panel.

EDIT: you may need to enable "Show hidden devices" in the Sound applet in Control Panel in order for it to show up (like here)

Via control panel Sound control panel

Upvotes: 11

Related Questions