From: beda meda on 30 Apr 2010 04:15 Hi! I have a speech signal and my task is to find, if there are some frequencies, that are missing in the signal. I'm not sure, how to do this, maybe something with FFT? Thanks for any help.
From: us on 30 Apr 2010 06:02 "beda meda" <b.meda(a)centrum.cz> wrote in message <hre3is$7ba$1(a)fred.mathworks.com>... > Hi! > I have a speech signal and my task is to find, if there are some frequencies, that are missing in the signal. I'm not sure, how to do this, maybe something with FFT? > Thanks for any help. for starters, FFT sounds very good(!)... get your hands dirty... help fft; us
From: beda meda on 30 Apr 2010 07:24 "us " <us(a)neurol.unizh.ch> wrote in message <hre9qs$ke4$1(a)fred.mathworks.com>... > "beda meda" <b.meda(a)centrum.cz> wrote in message <hre3is$7ba$1(a)fred.mathworks.com>... > > Hi! > > I have a speech signal and my task is to find, if there are some frequencies, that are missing in the signal. I'm not sure, how to do this, maybe something with FFT? > > Thanks for any help. > > for starters, FFT sounds very good(!)... > get your hands dirty... > > help fft; > > us OK, here's my code: x = sig(1350:(1350+511)); x = x.*hamming(512); X = fft(x); f = Fs/2*linspace(0,1,256); figure plot(f,2*abs(X(1:256))) I created freq. axis from the example, which is in help fft, but I'm not sure, why there is "2*" in plot. Now I have this plot and I would say, that any frequency with zero value would be "missing". Am I right?
From: Greg Heath on 1 May 2010 02:20 On Apr 30, 7:24 am, "beda meda" <b.m...(a)centrum.cz> wrote: > "us " <u...(a)neurol.unizh.ch> wrote in message <hre9qs$ke...(a)fred.mathworks.com>... > > "beda meda" <b.m...(a)centrum.cz> wrote in message <hre3is$7b...(a)fred.mathworks.com>... > > > Hi! > > > I have a speech signal and my task is to find, if there are some frequencies, that are missing in the signal. I'm not sure, how to do this, maybe something with FFT? > > > Thanks for any help. > > > for starters, FFT sounds very good(!)... > > get your hands dirty... > > > help fft; > > > us > > OK, here's my code: > x = sig(1350:(1350+511)); > x = x.*hamming(512); > X = fft(x); > f = Fs/2*linspace(0,1,256); > figure > plot(f,2*abs(X(1:256))) > > I created freq. axis from the example, which is in help fft, but I'm not sure, why there > is "2*" in plot. There shouldn't be. Power, not amplitude is doubled. The frequency range and corresponding power spectral density is f = (Fs/N)*[0:N-1]; PSD = abs(X).^2 / N; However, X has the conjugate symmetry X(N+2-k) = conj( X(k) ) % k = 2 : N/2 therefore PSD(N+2-k) = PSD(k) % k = 2 : N/2 and the total signal power can be represented on the reduced fequency range fr = f([1, 2:N/2, N/2+1) ; fr = (Fs/N)*[0, 1:N/2-1, N/2]; by PSDr = [PSD(1), 2*PSD(2:N/2), PSD(N/2+1)]; >Now I have this plot and I would say, that any frequency with zero value would >be "missing". Am I right? Theoretically yes. However, a measured real-world spectrum will be continuous with contributions from noise, interference and other nonsignal sources. Therefore you have to set a threshold to determine what to call "nonsignal". Choosing to threshold PSD at some fraction of mean(PSD) seems reasonable. Additional info on power spectrum scaling is available at http://groups.google.com/group/comp.soft-sys.matlab/msg/2222327db2ea7f51?hl=en or http://www.mathworks.de/matlabcentral/newsreader/view_thread/80849 Hope this helps. Greg
From: beda meda on 13 May 2010 12:48 Well, this works great, thanks! There is still one question: I can do all this process on one frame at a time. Do you think it could be somehow applied for whole signal? I mean evaluation of missing frequencies for whole signal. I don't think there will be for example some frequencies that will be missing in every frame, so that's not the way. Can you think about anythink? Greg Heath <heath(a)alumni.brown.edu> wrote in message <6b3596c6-00b9-413a-aca0-458a198e43a1(a)37g2000yqm.googlegroups.com>... > On Apr 30, 7:24 am, "beda meda" <b.m...(a)centrum.cz> wrote: > > "us " <u...(a)neurol.unizh.ch> wrote in message <hre9qs$ke...(a)fred.mathworks.com>... > > > "beda meda" <b.m...(a)centrum.cz> wrote in message <hre3is$7b...(a)fred.mathworks.com>... > > > > Hi! > > > > I have a speech signal and my task is to find, if there are some frequencies, that are missing in the signal. I'm not sure, how to do this, maybe something with FFT? > > > > Thanks for any help. > > > > > for starters, FFT sounds very good(!)... > > > get your hands dirty... > > > > > help fft; > > > > > us > > > > OK, here's my code: > > x = sig(1350:(1350+511)); > > x = x.*hamming(512); > > X = fft(x); > > f = Fs/2*linspace(0,1,256); > > figure > > plot(f,2*abs(X(1:256))) > > > > I created freq. axis from the example, which is in help fft, but I'm not sure, why there > is "2*" in plot. > > There shouldn't be. Power, not amplitude is doubled. > > The frequency range and corresponding power > spectral density is > > f = (Fs/N)*[0:N-1]; > PSD = abs(X).^2 / N; > > However, X has the conjugate symmetry > > X(N+2-k) = conj( X(k) ) % k = 2 : N/2 > > therefore > > PSD(N+2-k) = PSD(k) % k = 2 : N/2 > > and the total signal power can be represented > on the reduced fequency range > > fr = f([1, 2:N/2, N/2+1) ; > fr = (Fs/N)*[0, 1:N/2-1, N/2]; > > by > > PSDr = [PSD(1), 2*PSD(2:N/2), PSD(N/2+1)]; > > > >Now I have this plot and I would say, that any frequency with zero value would >be "missing". Am I right? > > Theoretically yes. > > However, a measured real-world spectrum will be continuous > with contributions from noise, interference and other > nonsignal sources. Therefore you have to set a threshold > to determine what to call "nonsignal". > > Choosing to threshold PSD at some fraction of mean(PSD) > seems reasonable. > > Additional info on power spectrum scaling is available at > > http://groups.google.com/group/comp.soft-sys.matlab/msg/2222327db2ea7f51?hl=en > > or > > http://www.mathworks.de/matlabcentral/newsreader/view_thread/80849 > > Hope this helps. > > Greg
|
Next
|
Last
Pages: 1 2 Prev: Return digits of a number as a list Next: show pixels within some range |