some simple manipulations of sound using digital signal processing richard m. stern 18-791 demo...
Post on 19-Dec-2015
214 views
TRANSCRIPT
SOME SIMPLE MANIPULATIONS OF SOUND USING DIGITAL SIGNAL PROCESSING
Richard M. Stern
18-791 demo
August 31, 2004
Department of Electrical and Computer Engineeringand School of Computer Science
Carnegie Mellon UniversityPittsburgh, Pennsylvania 15213
CarnegieMellon Slide 2 18-791 Digital Signal Processing I
The original sound and its spectrogram
Time0 0.2 0.4 0.6 0.8 1 1.2
0
1000
2000
3000
4000
5000
CarnegieMellon Slide 3 18-791 Digital Signal Processing I
Downsampling the waveform
Downsampling the waveform by factor of 2:
0 10 20 30 40 50 60 70 80 90 100-0.015
-0.01
-0.005
0
0.005
0.01
0.015
n
0 5 10 15 20 25 30 35 40 45 50-0.015
-0.01
-0.005
0
0.005
0.01
0.015
n
CarnegieMellon Slide 4 18-791 Digital Signal Processing I
Consequences of downsampling
Time0 0.1 0.2 0.3 0.4 0.5 0.6
0
1000
2000
3000
4000
5000 Original:
Downsample
Downsampled:
CarnegieMellon Slide 5 18-791 Digital Signal Processing I
Upsampling the waveform
Upsampling by a factor of 2:
0 10 20 30 40 50 60 70 80 90 100-0.015
-0.01
-0.005
0
0.005
0.01
0.015
n
0 20 40 60 80 100 120 140 160 180 200-0.015
-0.01
-0.005
0
0.005
0.01
0.015
n
CarnegieMellon Slide 6 18-791 Digital Signal Processing I
Consequences of upsampling
Time0 0.5 1 1.5 2 2.5
0
1000
2000
3000
4000
5000
Original:
Upsampled:
CarnegieMellon Slide 7 18-791 Digital Signal Processing I
Linear filtering the waveform
x[n] y[n]
Filter 1:y[n] = 3.6y[n–1]+5.0y[n–2]–3.2y[n–3]+.82y[n–4]+.013x[n]–.032x[n–1]+.044x[n–2]–.033x[n–3]+.013x[n–4]
Filter 2:y[n] = 2.7y[n–1]–3.3y[n–2]+2.0y[n–3–.57y[n–4]+.35x[n]–1.3x[n–1]+2.0x[n–2]–1.3x[n–3]+.35x[n–4]
CarnegieMellon Slide 8 18-791 Digital Signal Processing I
Filter 1 in the time domain
0 20 40 60 80 100 120-0.015
-0.01
-0.005
0
0.005
0.01
0.015
n
0 20 40 60 80 100 120-2
0
2
4
6
8x 10-3
n
CarnegieMellon Slide 9 18-791 Digital Signal Processing I
Output of Filter 1 in the frequency domain
Time0 0.2 0.4 0.6 0.8 1 1.2
0
1000
2000
3000
4000
5000
Original:
Lowpass:
CarnegieMellon Slide 10 18-791 Digital Signal Processing I
Filter 2 in the time domain
0 20 40 60 80 100 120-0.015
-0.01
-0.005
0
0.005
0.01
0.015
n
0 20 40 60 80 100 120-0.01
-0.005
0
0.005
0.01
n
CarnegieMellon Slide 11 18-791 Digital Signal Processing I
Output of Filter 2 in the frequency domain
Time0 0.2 0.4 0.6 0.8 1 1.2
0
1000
2000
3000
4000
5000
Original:
Highpass:
CarnegieMellon Slide 12 18-791 Digital Signal Processing I
The source-filter model of speech
A useful model for representing the generation of speech sounds:
Pitch
Pulse train source
Noise source
Vocal tract model
Amplitude
p[n]
CarnegieMellon Slide 13 18-791 Digital Signal Processing I
Separating the vocal-tract excitation from the filter
Original speech:
Speech with 75-Hz excitation:
Speech with 150-Hz excitation:
Speech with noise excitation: