Digital Signal Processing Reference
In-Depth Information
2 x 10 4
0
-2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
x 10 4
2 x 10 4
0
-2
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
2000
0
-2000
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
2 x 10 4
0
-2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
x 10 4
Sample number
FIGURE 13.11
Two-band analysis and synthesis for speech data.
Program 13.1. Two-band subband system MATLAB implementation.
% This program is for implementing analysis and synthesis using two subbands.
close all; clear all;clc
% Smith-Barnwell PR-CQF 8-taps
h0
¼
[0.0348975582178515 -0.01098301946252854 -0.06286453934951963
.
0.223907720892568 0.556856993531445 0.357976304997285
.
-0.02390027056113145 -0.07594096379188282];
% Read data file "orig.dat" with sampling rate of 8 kHz
load orig.dat; % Load speech data
M ¼ 2; % Downsample factor
N ¼ length(h0); PNones ¼ ones(1,N); PNones(2:2:N) ¼ -1;
h1 ¼ h0.*PNones; h1 ¼ h1(N:-1:1);
g0 ¼ -h1.*PNones; g1 ¼ h0.*PNones;
disp( ' check R(z) þ R(-z) ¼ > ' );
xcorr(h0,h0)
sum(h0.*h0)
w ¼ 0:pi/1000:pi;
fh0 ¼ freqz(h0,1,w); fh1 ¼ freqz(h1,1,w);
plot(w,abs(fh0), ' k ' ,w,abs(fh1), ' k ' );grid; axis([0 pi 0 1.2]);
xlabel( ' Frequency in radians ' );ylabel( ' Magnitude) ' )
figure
speech ¼ orig;
 
Search WWH ::




Custom Search