Audio making crackling sounds when I record

I am using the latest version of audacity, 2.3.2 while trying to record.

I am currently using a Focusrite 2i4 interface, and a Neumann TLM102 for recording my voice. However, when I record I get this crackling sound. However, when I use the laptop microphone there is no problem.

With the Neumann:

Laptop mic:

The problem, as you can see in this zoomed-in screenshot, is that there are small bits of the waveform “missing” (which I’ve marked with labels). These are called “dropouts” (or “drop outs” or “drop-outs”).

Normally, Audacity 2.3.2 will throw a warning and add labels when there are drop-outs. As you didn’t mention that, I assume that is not happening (?)

If you open “Edit menu > Preferences”, in the “Recording” section, is the option “Detect Dropouts” enabled?

Yes I checked, it is enabled. I am quite unsure whats going on. I uninstalled my programs, and installed the drive for Fuocusrite 2i4, and it is less staticy now but still causes SOME problems with a little static.

I tried switching mics, this is from the Audio Technia 2020

but you’re not getting any warnings or labels created when the dropouts occur?

I am not getting any warning or anything. It is acting like there is not a problem

That indicates that the problem is occurring before the audio data reaches Audacity.

Look in the Windows Sounds settings to see what sample rate the Focusrite 2i4 is set to.

Do you have any audio apps running in the background (including voip applications such as Skype)?

Yes thank you, I am playing with the settings but there is still a little bit of static, although not as much. I tried from sample rate 44100 with Buffer Size 64, to 48000 with buffer size 64 etc. But I still cannot find the right setting for it to be no static at all.
No I do not have Skype installed or any VOIP.

Is that in Audacity’s “Preferences” settings? If so, the default buffer size is 100 ms. Smaller buffers are more likely to result in skips and crackles, so it may be that you have set the buffer too small.

What is the sample rate for the Focusrite 2i4 in the Windows Sound settings?

Hello thanks so much for your help and feedback. I think what the problem was it was not on a high enough frequency. I switched it to the highest 192000 on both audacity and the focusrite with 32 bit and there is not static unlike when it was set to 41000 and 48000. Do you have any reason why this is?

It “should” be possible to get it working at 44100 or 48000 (192000 is rather excessive), but whatever sample rate you choose, it’s best (least likely to crackle) if the sample rate is the same throughout (hardware / Windows Sound settings / Audacity settings). Some systems are fussy about the buffer settings (I don’t know why), so it may be necessary to “tune” the buffer size once you’ve decided what sample rate you want to use.

To “tune” the buffer size, start at 100, test, decrease by 10, test again, repeat…
If it gets worse, try the other way: start at 100, test, increase by 10, test again, repeat…