About how to extract a speech signal's envelope
6 次查看(过去 30 天)
显示 更早的评论
Hello,
I had a question about extract a speech signal's envelope.
y=wavread('test.wav');
x=hilbert(y);
x1=abs(x);
x2=sqrt(x.*conj(x));
x1 and x2 are two different way that I had found on Google. Looks very similar but not equal (isequal(x1,x2)=0)
I don't know which one was right. and I had try some code about envelope detector on MATLAB file center, but the result seems not correct...
Thanks
0 个评论
采纳的回答
Wayne King
2013-2-18
编辑:Wayne King
2013-2-18
Using the Hilbert transform is a better way to proceed than your
x2 = sqrt(x.*conj(x));
The above just gives the magnitude squared of each of the waveform values and that is not the envelope. At least probably not in the sense you mean envelope. To illustrate how the Hilbert transform does indeed extract the envelope, I'll give you a simple example with an AM-modulated wave.
Fs = 1000;
t = 0:0.001:1-0.001;
% 250-Hz sine wave modulated at 10 Hz
x = [1+cos(2*pi*10*t)].*cos(2*pi*250*t);
y = hilbert(x);
plot(t,x,'k'); hold on;
plot(t,abs(y),'b','linewidth',2);
plot(t,-abs(y),'b','linewidth',2);
If you know zoom in on parts of the waveform, you'll clearly see how the modulus of the analytic signal yields the envelope. Specifically, you see that the envelope oscillates at 10 Hz.
set(gca,'xlim',[0.05 0.35]);
set(gca,'ylim',[-2 2])
更多回答(1 个)
Wayne King
2013-2-18
Yes, basically, although, I'm not sure why you set the amplitude equal to 0.5
For example:
load mtlb;
analmtlb = hilbert(mtlb);
t = 0:1/Fs:length(mtlb)*(1/Fs)-1/Fs;
x = cos(2*pi*500*t);
y = abs(analmtlb).*x';
soundsc(y,Fs)
2 个评论
Wayne King
2013-2-18
yes, in my example, analmtlb was the analytic signal, so the absolute value is the envelope.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Signal Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!