-1
$\begingroup$
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))));
$\endgroup$
  • $\begingroup$ can anyone explain this code i'm new beginner in speech signal processing field and my programming skills are not good $\endgroup$ – zeee Jan 7 '14 at 19:40
  • 1
    $\begingroup$ You really need to just google for a matlab syntax guide, here: mathworks.com/help/matlab/math/… $\endgroup$ – user1529 Jan 8 '14 at 5:48
  • $\begingroup$ thanks .can you explain what does it mean these syntax x(1 : i) = []; x(6000 : 10000) = 0; $\endgroup$ – zeee Jan 8 '14 at 21:09
2
$\begingroup$

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)

$\endgroup$
  • $\begingroup$ i=i+1;is this line using for increment? can you further explain? $\endgroup$ – zeee Jan 7 '14 at 19:46
  • $\begingroup$ yes, you start from x(1), find it less than 0.05, then goto x(2), ....so on and so forth , until some x(i)>0.05 $\endgroup$ – lennon310 Jan 7 '14 at 19:48
  • $\begingroup$ Mel function basically representation of speech on mel scale which approximate human auditory response. $\endgroup$ – zeee Jan 7 '14 at 19:54
  • $\begingroup$ ok. so it is some transformation on the original sound signal, then get the magnitude distribution after the transformation $\endgroup$ – lennon310 Jan 7 '14 at 19:55
  • $\begingroup$ Ok thanks one last thing is these two steps are still in confusion can you explain?x(1 : i) = []; x(6000 : 10000) = 0; $\endgroup$ – zeee Jan 7 '14 at 19:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.