c# capture microphone

后端 未结 2 943
猫巷女王i
猫巷女王i 2021-01-20 02:27

Can someone tell me how could I capture the microphone and send it over IP? Is there any example of how to capture and put into a buffer in order to send it on UDP socket to

相关标签:
2条回答
  • 2021-01-20 02:48

    you can find some open source projects you could get inspired from: http://www.voip-info.org/wiki/view/Open+Source+VOIP+Software

    if you just want to stream audio via UDP maybe you don't need a full implementation of the SIP stack but if you want to make a skype-clone you probably do.

    0 讨论(0)
  • 2021-01-20 03:03

    Since you're transferring music and not speech I recommend Vorbis as codec and not Speex. There are some C# wrappers available. Vorbis has higher latency and bandwidth than Speex, but Speex only works well for speech and not for music.

    Mine is available on github: https://github.com/CodesInChaos/Xiph
    It also includes a wrapper to the noise suppression of the speex pre-processor. But I've never tried it on music.

    Is there any reason why you want UDP? If latency isn't very important I'd just use TCP instead.

    To get the audio you can use NAudio, or as I did the code from http://www.codeproject.com/KB/cs/Streaming_wave_audio.aspx

    0 讨论(0)
提交回复
热议问题