语音信号课程设计 语谱图程序 [x]=wavread('E:\lyf.wav');
sampling_rate = 44100; % sampling rate
lfft = 1024; % FFT length
lfft2 = lfft/2;
winlgh = 1024; % 窗长
frmlgh = 100; % 帧移
noverlap = winlgh - frmlgh;
x = 2.0*x/max(abs(x));
etime = length(x)/sampling_rate;%真实的时间
spec = abs(specgram(x, lfft, sampling_rate, winlgh, noverlap));
subplot(211);
plot((1:length(x))/sampling_rate,x)
评论0
最新资源