How to Play a sound file on line-in (Microphone)?

谁都会走 提交于 2019-11-28 02:13:42

问题


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


回答1:


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).




回答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.



来源:https://stackoverflow.com/questions/6561221/how-to-play-a-sound-file-on-line-in-microphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!