I developed a MEMS microphone based audio capturing device and transfer that audio via USB to the PC. I used Audacity opensource software to test my working and found the audio plays well when recorded and I play back the recorded sound but has static/crackling noise during the live stream.

I tried this with various apps but I find this issue only while listening to live streaming audio and not with the recorded audio.

Is there a problem with my hardware designed or the Audacity app. Since the recorded sound is similar to what I expect I think there could be a problem with live stream mode. I tried a few settings on Audacity but still, get the same static/crackling noise.

What could be the issue? How can I fix this problem?


Sample rate: 8kHz
Channels: Mono
Format: PCM 16

1 Answer 1


That can be a lot of things, most including software problems, but in all likelihood:

This is a rate mismatch problem. Either, your software can't resample the 8 kHz to its internal sampling rate e.g. for codecs, or you think you're doing 8 kHz, where in reality you're doing 7.992 kHz or 8.008 kHz (or some other variation).

So, encoder expect 8000 samples a second an average, gets less (or more), and things run out of sync.


  1. Make sure the oscillator you used for generating the 8 kHz is not your source for clock mismatch
  2. Try using a higher sampling rate; not all clock generators are equal, and 8 kHz sampling rate is really unusually low for PC audio systems (because the highest signal frequency you can represent with that is just under 4 kHz; that's lower than what you'd typically want, anyways, because the signal power spectrum useful for making speech intellegible extends to beyond 5 kHz. 4 kHz just gives you slightly better sound than the POTS-typical 3.4 kHz cutoff, so you'll sound like people on the phone in old movies.
  • \$\begingroup\$ The oscillator generates correct signals. Things getting out of sync was the problem for me as you said. The microphone capture clock and USB clock were out of sync, maybe phase difference or drift. By managing them and using large buffer to capture microphone data solved my problem.Thank you for your intuition. \$\endgroup\$
    – Alan
    May 21, 2020 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.