In Audacity I am trying analyze an audio sample recorded at 8000Hz using Analyze>Plot Spectrum option.

First I selected exactly 128 samples from my audio stream and in the frequency analysis window I set size=128

Now I can see the graph where x-axis is from 0Hz to 4000Hz.

But I have selected only 128 samples from the stream, I should get x-axis from 0Hz to 64Hz range.

Please help me to understand this utility.

This page in the manual should help your understanding: http://manual.audacityteam.org/o/man/plot_spectrum.html

WC

The plot shows the correct frequency range.

Low frequencies are poorly represented in FFT’s of only 128 samples. Divide the sample rate by half the size and you know how much the “bins” are apart: 8000/64 = 120 Hz.

The lowest bin is at DC (= positive or negative offset of the waveform). The next bin gives the amount for a period that goes exactly once into the chosen frame - 120 Hz.

This goes so on until the Nyquist frequency is reached. This waveform would look like: 1 -1 1 -1 1 -1…

Thus, this frequency could even be seen in a 2 sample spectrum (with only F 0 Hz and F 4000 Hz).

rIf you want to read out the lowest 6equencies, you just have to increase the length up to 8000 samples (8192).