Search code examples
c#naudiomicrophonehololens

Hololens - stream microphone to PC


I would like to send, in real time, the microphone stream of the Hololens (first generation) to a PC. I am using the MicrophoneTransmitter.cs from the VoiceChat example, that I modified to send the stream using a UDP socket. On the PC side, I use NAudio to hear it. The NAudio receiver is set at 48000 Hz, 32 bits, 1 channel (I retrieved these information from MicrophoneTransmitter.cs). The communication works and I receive the packets on the PC. However, there is a lot of (what looks like) background noise. There is no such noise when I stream the microphones over the web portal of the Hololens. It also slows down the Hololens app. I am not familiar with audio processing. Is there someone who already did something similar?


Solution

  • WebRTC supports sending audio and video streams over a network between HoloLens and PCs. You might be able to leverage the MixedReality-WebRTC codebase. It supports some echo cancellation, noise reduction, etc.