I am generating a sine wave using audacity with 2000 Hz, 30s duration, amplitude 0.5

48 kHz is the sampling rate of the recording device.

I just play and record the generated sound, this is the spectrogram that I get. (Top is original while bottom is recorded) Frequencies other than 2kHz are also showing up in the spectrogram with significant power density. (Using 2048 point hanning window for FFT).

Frequency Domain

This is the time domain representation for the generated and recorded signal, this is shown to ensure clipping is not happening. Time Domain

Why does the spectrogram show these higher frequencies and how could I remove them.

I could not find answer to my query on other similar posts in DSP stack exchange thus am creating this post.

  • $\begingroup$ It's important to actually put these lines in relation; so, what's the power difference between the "main" tone and the new ones? If the other tones are 1/1,000,000 of the main tone... $\endgroup$ Jul 5, 2017 at 7:46
  • $\begingroup$ There is a ~24 dB difference between the main tone and most prominent of other tones $\endgroup$ Jul 5, 2017 at 8:37
  • $\begingroup$ Audacity has filter tools to remove those unwanted frequencies (try low pass filter for above 2k, high pass filter for below 2k or just use band pass filter to pass the needed frequencies ... steeper the filter is less garbage it remains). $\endgroup$
    – Juha P
    Jul 5, 2017 at 12:07

1 Answer 1


Following could be the reason for extra frequencies -

  • Non Ideal characteristics of speaker used to play the generated sine wave.
  • Non Ideal characteristics of microphones used to record the played sine wave.

Also one needs to make sure that given sampling rate(48kHz) is supported by the speaker/sound card and the recording microphone otherwise extra frequency components will be introduced.

  • $\begingroup$ I was just confused whether such systematic/structured pattern could be obtained due to non ideality of speakers/mics. I have verified that both speaker and mic support the sampling rate i.e. I am able to play and record 24000 = 48000/2 frequency sounds. $\endgroup$ Jul 4, 2017 at 13:28
  • $\begingroup$ Also the time domain signals of original and recorded sound look pretty much the same. $\endgroup$ Jul 4, 2017 at 13:31
  • $\begingroup$ Also I have testing same on multiple laptops, all giving similar results $\endgroup$ Jul 4, 2017 at 13:40
  • $\begingroup$ Reason for looking same in time domain is that relative amplitude of higher frequencies is very less compared to the main 2KHz sine wave. $\endgroup$
    – Arpit Jain
    Jul 5, 2017 at 5:41
  • $\begingroup$ Reason for looking same in time domain is that relative amplitude of higher frequencies is very less compared to the main 2KHz sine wave. also this kind of effects appear due to non ideal nature of microphone. you can try one more exercise- just play a chirp signal and see recording in frequency domain, similar extra components will be visible. but they are insignificant and will not affect your results as their relative magnitudes are very less. $\endgroup$
    – Arpit Jain
    Jul 5, 2017 at 5:46

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.