while abs(x(i)) <0.05 % Silence detection i = i + 1; end x(1 : i) = ; x(6000 : 10000) = 0; x1 = x.* w; mx = fft(x1); % Transform to frequency domain nx = abs(mx(floor(mel(f))));
x is a sound signal, the
while loop finds out the time point that sound first comes out. Before that, the signal is regarded as silence and removed, the signal within 6000 and 10000 elements are set to zero.
w is probably a window function that extracted the time zone you are interested, then the signal is converted to frequency domain.
nx is the magnitude in frequency domain. (I am not sure what does
mel mean, perhaps a function defined in another file)