Digital Signal Processing Reference
In-Depth Information
Original speech
200
150
100
50
0
0
500
1000
1500
2000
2500
3000
3500
4000
Pr
e
-empha
s
ized spe
e
ch
60
40
20
0
0
500
1000
1500
2000
2500
3000
3500
4000
Frequency (Hz)
FIGURE 6.31
Amplitude spectral plots for the original speech and pre-emphasized speech.
title(
Speech: We lost the golden chain.
)
'
'
subplot(2,1,2),plot(y);grid
ylabel(
Filtered samples
)
'
'
xlabel(
Number of samples
);
'
'
title(
Preemphasized speech.
)
'
'
figure(3);
N
¼
length(speech);
% Length of speech
Axk
¼
abs(fft(speech.*hamming(N)
'
))/N;
% Two-sided spectrum of speech
Ayk
¼
abs(fft(y.*hamming(N)
'
))/N;
% Two-sided spectrum of pre-emphasized speech
f
¼
[0:N/2]*fs/N;
Axk(2:N)
¼
2*Axk(2:N);
% Get one-sided spectrum of speech
Ayk(2:N)
¼
2*Ayk(2:N);
% Get one-sided spectrum of filtered speech
subplot(2,1,1),plot(f,Axk(1:N/2
þ
1));grid
ylabel(
'
Amplitude spectrum Ak
'
)
title(
'
Original speech
'
);
subplot(2,1,2),plot(f,Ayk(1:N/2
þ
1));grid
ylabel(
'
Amplitude spectrum Ak
'
)
xlabel(
'
Frequency (Hz)
'
);
title(
'
Preemphasized speech
'
);
%
Search WWH ::
Custom Search