# Distinguish harmonic sounds from non-harmonic

I am trying to distinguish harmonic sounds in the range from $100\rm \ Hz$ to $1000\rm \ Hz$ in my audio recording.

I attach the spectrogram ($y$-axis is freqeuncy and $x$-axis is time) of a typical audio recording. The red square shows the harmonic sounds I want to distinguish, whereas the green one - the random sounds which I want to omit.

I can clearly see the harmonic components and consistent high-power fundamental frequency in the wanted sounds, while random sounds are not harmonic and frequency range is cluttered with low-power components.

My question is, how do I distinguish them?

I was thinking of calculating THD for both and selecting only the high results as harmonic sounds seem to carry more power, however, that's not always the case.