2

That title may be seem Ridiculous but I Have problem. I have Service capture line-in and, save file on system as sound file (that service didn't develop by me, and I must use that).

So I want to write program to select sound file (*.wav, *.mp3 or etc), and then that sound file, will be play on Line-in (Microphone) to record as user speech.

Q: So How Do this In C#? Any Advise?
Thanks

Rev
  • 2,269
  • 8
  • 45
  • 75
  • So you just want to emulate the microphone, not actually send output to the line-in, right? – Gabe Jul 03 '11 at 05:28
  • @Gabe,Thanks for Attention. That service monitor line-in and capture sound file base on line-in. so I want to play sound on line-in and also have major duty of line-in(mean get voice from microphone). so I think that don't need to be emulate anything! – Rev Jul 03 '11 at 05:53
  • @Rev See Below Answer, It will solve your query. – Suraj Jain Feb 16 '17 at 08:55

2 Answers2

4

You need to use a virtual audio device driver (like this for example), which will allow you to play audio to that output device and it to appear as an input device to another application. Alternatively, just use a physical cable to connect an output to an input (taking care not to cause a feedback loop).

Mark Heath
  • 48,273
  • 29
  • 137
  • 194
  • ops! it's not free! is there any way with programing! – Rev Jul 04 '11 at 12:42
  • Writing a virtual audio device driver is possible, but a lot of work. Unfortunately, there is no other way to do what you have asked for. – Mark Heath Jul 04 '11 at 14:42
  • Any advice for writing ***Virtual Audio device driver*** program? C#.net possible or C++ or etc? – Rev Jul 05 '11 at 06:22
  • Not possible in C# unfortunately. See [this answer](http://stackoverflow.com/questions/4334561/virtual-audio-driver-microphone) for more details. – Mark Heath Jul 05 '11 at 06:31
  • @Rev Have You Checked the below for playing on microphone ? – Suraj Jain Feb 19 '17 at 11:05
2

You can use VB-Audio Virtual Cable, It is free of Cost and you will be able to play speaker as the input to microphone, I did it myself to test speech recognition, played video on the PC, and the Software Voicemeeter By Same Company Helped me. It basically connected the virtual output to virtual input, Something like that ,It is really simple. I Hope it works for you like it did for me.

Also See This Answer Which Originally Suggested this and was life saver for me, Play audio as microphone input.

Community
  • 1
  • 1
Suraj Jain
  • 4,463
  • 28
  • 39