SlideShare una empresa de Scribd logo
1 de 6
Descargar para leer sin conexión
ECE 4680 DSP Laboratory 2:
      Speech Signal Processing Using MATLAB
                 Sound Functions
This lab is to be worked in teams of most two. Each team will submit a lab report describing their
results. An E-mail ZIP package containing .wav files will also be turned in or a lab demo to the
instructor, to allow evaluation of the processing algorithms. The lab due date is 4:30 PM Thurs-
day, September 17, 2009.


Introduction
Using a basic PC sound system and MATLAB wave file processing functions, near real-time audio
signal processing can be investigated. In this experiment you will become familiar with *.wav
files and MATLAB functions for reading and writing wave files from the MATLAB work space.
    The basic investigation for this experiment will be the use of butt splicing to either speed up or
slow down the playing time (delivery) of a recorded speech signal (in MATLAB a vector), without
altering the pitch. Think about this for a moment. If a signal is played back at a sampling rate of
twice the original record value, the play back time is cut in half, and the pitch is doubled. Likewise
if a signal is played back at a sampling rate of one half the original record value, the play back
time is doubled, and the pitch is halved. Using butt splicing of speech segments it is possible to
maintain the recorded pitch while either slowing down or speeding up the play back time.


Digital Signal Processing and Windows Wave Files
With the multimedia enhancements to Windows came the ability to handle digitized audio signals
in what is known as the wave (*.wav) file format. A Wave audio file is a binary file format for
storing continuous-time audio source material, in sampled data form, as a result analog-to-digital
(A/D) conversion. A sound system equipped PC generally includes two channels for recording
and two digital-to-analog (D/A) converters for play back. The block diagram of Figure 1 depicts
the DSP capability that a sound system equipped PC typically has.
   The current DSP capability connected with wave file manipulation is not geared toward real-
time processing. It is best suited to what one might call near real-time signal processing. Signals
can be processed after being initially recorded, then saved as a new wave file for play back at
another time.


Wave Files and Sound in MATLAB
The vector signal processing capabilities of MATLAB make it ideally suited for post processing, or



Introduction                                                                                        1
ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions




                                    Near Real-Time DSP Using
                                     C/C++, multimedia tool,
                                       other, e.g., MATLAB



                         A/D                                              D/A
                     Conversion                                       Conversion
                     8 or 16 bits                                     8 or 16 bits
                                              RAM or
                                             Hard Disk
   From PC             Fs                    Storage as                       Fs       To PC
  Microphone                                   *.wav                                  Speakers
                                                File
                         A/D                                              D/A
                     Conversion                                       Conversion
                     8 or 16 bits                                     8 or 16 bits


                       Fs                                                     Fs

                                      Sampling Rate Choices:
                                 Fs = 8, 11.025, 22.05, or 44.1 kHz

        Figure 1: DSP capability of the typical sound card equipped PC.
if you wish, near real-time processing, of windows wave files. There are four sound processing
functions for a windows PC. Two functions are used in the playing of MATLAB vectors (matrices)
through the PC sound board, while the other two are used to read and write wave files to and from
the MATLAB workspace. The functions are summarized in Table 1.

      Table 1: MATLAB sound functions for Win/Mac/Linux OS’s.

                                 MATLAB Sound Related Functions
       sound(y,Fs)                  Convert a vector into sound and play at sampling rate
                                    Fs. Amplitude values must lie between -1 and +1.
       soundsc(y,Fs)                Convert a vector into sound and play at sampling rate Fs
                                    with automatic amplitude scaling.
       [y, Fs, nbits] =             Load windows wav format sound file into workspace
        wavread(fname)              variable y. Also returns sampling rate and bits/sample.
       wavwrite(y,Fs,               Writes the data stored in the variable y to a WAVE file
       fname)                       called fname.

As Figure 1 indicates *.wav files have many variations, ranging from single channel audio


Wave Files and Sound in MATLAB                                                                   2
ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions


recorded with 8-bits at F s = 8 ksps, up to the more memory intensive two channel (stereo) audio
recorded with 16-bits per channel at F s = 44.1 ksps. The MATLAB sound functions support all of
this capability and allow a variable sample rate. To read a pre-recorded *.wav file simply type
        >>[y, Fs] = wavread(‘name.wav’;
The audio signal is stored in the column vector y and sampling rate used to make the recording is
returned to variable Fs. To play the sound vector from within the MATLAB environment simply
type
        >> sound(y, Fs)
where Fs may be altered from the nominal record value to speed up or slow down the vector play-
ing time. For this experiment a nominal sampling rate of 11.025 kHz is recommended.
   An interesting feature of the sound function is that it will also play MATLAB matrices, column-
by-column. This capability will be useful, and you will verify this in the experiments.


Simple Rate Changing Independent of Pitch
Without getting too detailed this section explains a simple technique for either increasing or
decreasing the playing time of a sound vector, without altering the sound pitch. Increasing the rate
refers to decreasing the playing time, while decreasing the rate implies increasing the playing
time. Both operations can be solved in an approximate way by butt splicing speech segments of
say 45 ms or so. Butt splicing in DSP is analogous to adding or removing segments of magnetic
recording tape by end-to-end taping them together to form a new edited tape. Butt splicing of
speech sequences thus implies that no transition smoothing is used, just a hard end-to-end connec-
tion.

Decreasing Playback Time
To decrease the playback time, yet retain the proper pitch, all we need do is to periodically remove
short segments of the original speech vector, butt splice the remaining pieces back together, then
play it back at the original recording rate. If the pattern is save 45 ms, discard 45 ms, save 45 ms,
etc., the new sound vector will be half as long as the original, thus it will play in half the time. A
graphical description of the operation in terms of MATLAB matrices is shown in Figure 2. The seg-
ment length may need to be adjusted for best sound quality.

Increasing Playback Time
To increase the playback time, yet retain the proper pitch, all we need do is to periodically repeat
short segments of the original speech vector, again using a butt splicing technique, then play it
back at the original recording rate. If the pattern is say 45 ms, repeat previous 45 ms, save next 45
ms, etc., the new sound vector will be twice as long as the original, thus it will play in twice the
time. A graphical description of the operation in terms of MATLAB matrices is shown in Figure 3.
Again, the segment length may need to be adjusted for best sound quality.


Simple Rate Changing Independent of Pitch                                                           3
ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions




     Input               tstart =0
     Speech          1
     Vector y
                         45 ms
                     2                   Reshape            1     2      3           4   ...    M


                     3




                                                                             Parse
                     4
                    ...




                                                             1      3     5          7    ...   M
                     M
                         tstop

        Figure 2: Butt splicing to decreasing playing time yet maintain sound pitch.

MATLAB Hint:
>> A = [1 2; 3 4]
A =      1     2
         3     4
>> [A A]
ans =    1     2                 1   2
         3     4                 3   4
>> [A' A']
ans =    1     3                 1   3
         2     4                 2   4
>> [A' A']'
ans =    1     2
         3     4
         1     2
         3     4




Simple Rate Changing Independent of Pitch                                                           4
ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions




     Input              tstart =0
     Speech         1
     Vector y
                        45 ms
                    2                  Reshape              1     2      3             4    ...    M
                                                                                           45 ms

                    3




                                                                             Concat.
                    4
                    ...




                                                 45 ms       1      2      3           4           M
                                                                                            ...
                    M
                                                 45 ms       1      2      3           4           M
                        tstop                                                              90 ms

        Figure 3: Butt splicing to increase playing time yet maintain sound pitch.


Experiments
  1. Create a short wave file using 16 bits per sample resolution, F s = 11.025 ksps, and dura-
     tion of about 30 seconds, using GoldWave or a similar wave recording application.
  2. Import the wave file into the MATLAB workspace using the function
        >> [y, Fs] = wavread(‘name.wav’);

  3. Verify that sound(y,Fs) plays the vector through the sound system, and that raising or
     lowering Fs changes both the duration and pitch of the message. Using the length of y and
     Fs determine the exact time duration of the played sound vector.
  4. Verify that MATLAB plays a matrix by columns. First convert the vector y into a matrix
     using
        >> reshape(y, M, N),
      where M*N = length(y). Then play the matrix using sound. Verify that scrambled
      speech is heard if you play the transpose of your matrix.
  5. Butt splice y by removing alternate 45 ms speech segments to halve the delivery time and
     maintain the same pitch. Export your modified speech vector back into a wave file and ver-


Experiments                                                                                            5
ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions


      ify that it is playable.
  6. Butt splice y by inserting redundant 45 ms speech segments to double the delivery time and
     maintain the same pitch. Export your modified speech vector back into a wave file and ver-
     ify that it is playable.
  7. Try variations on 5 and 6 to improve the quality, or further alter the rate change.
  8. Analyze your speech waveforms using the spectrogram function
        >> spectrogram(y,FFTLENGTH,Fs,[WIND],OVERLAP)
      Recall from ECE 2610 that a spectrogram is a frequency spectrum versus time plot.
  9. Summarize your findings.
  10. Prepare for instructor demo.


Bibliography/References
[1] Tim Kientzle, A Programmers Guide to Sound, Addison-Wesley, Reading, Ma, 1998.




Bibliography/References                                                                      6

Más contenido relacionado

La actualidad más candente

Frequency hopping signal of dds based on fpga hardware
Frequency hopping signal of dds based on fpga hardwareFrequency hopping signal of dds based on fpga hardware
Frequency hopping signal of dds based on fpga hardwareVinsion Chan
 
EE443 - Communications 1 - Lab 3 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 3 - Loren Schwappach.pdfEE443 - Communications 1 - Lab 3 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 3 - Loren Schwappach.pdfLoren Schwappach
 
Lab manual uoh_ee370
Lab manual uoh_ee370Lab manual uoh_ee370
Lab manual uoh_ee370slatano
 
Audio and video compression
Audio and video compressionAudio and video compression
Audio and video compressionneeraj9217
 
1 AUDIO SIGNAL PROCESSING
1 AUDIO SIGNAL PROCESSING1 AUDIO SIGNAL PROCESSING
1 AUDIO SIGNAL PROCESSINGmukesh bhardwaj
 
Dereverberation in the stft and log mel frequency feature domains
Dereverberation in the stft and log mel frequency feature domainsDereverberation in the stft and log mel frequency feature domains
Dereverberation in the stft and log mel frequency feature domainsTakuya Yoshioka
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio filesMinh Anh Nguyen
 
Fft analysis
Fft analysisFft analysis
Fft analysisSatrious
 
Why Graphics Is Fast, and What It Can Teach Us About Parallel Programming
Why Graphics Is Fast, and What It Can Teach Us About Parallel ProgrammingWhy Graphics Is Fast, and What It Can Teach Us About Parallel Programming
Why Graphics Is Fast, and What It Can Teach Us About Parallel ProgrammingJonathan Ragan-Kelley
 
Fast Fourier Transform Analysis
Fast Fourier Transform AnalysisFast Fourier Transform Analysis
Fast Fourier Transform Analysisdhikadixiana
 
Audio Processing
Audio ProcessingAudio Processing
Audio Processinganeetaanu
 
Mathematical description of ofdm
Mathematical description of ofdmMathematical description of ofdm
Mathematical description of ofdmJulia Urbina-Pineda
 

La actualidad más candente (20)

Speech technology basics
Speech technology   basicsSpeech technology   basics
Speech technology basics
 
Frequency hopping signal of dds based on fpga hardware
Frequency hopping signal of dds based on fpga hardwareFrequency hopping signal of dds based on fpga hardware
Frequency hopping signal of dds based on fpga hardware
 
EE443 - Communications 1 - Lab 3 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 3 - Loren Schwappach.pdfEE443 - Communications 1 - Lab 3 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 3 - Loren Schwappach.pdf
 
Lab manual uoh_ee370
Lab manual uoh_ee370Lab manual uoh_ee370
Lab manual uoh_ee370
 
Audio and video compression
Audio and video compressionAudio and video compression
Audio and video compression
 
H0814247
H0814247H0814247
H0814247
 
1 AUDIO SIGNAL PROCESSING
1 AUDIO SIGNAL PROCESSING1 AUDIO SIGNAL PROCESSING
1 AUDIO SIGNAL PROCESSING
 
Dereverberation in the stft and log mel frequency feature domains
Dereverberation in the stft and log mel frequency feature domainsDereverberation in the stft and log mel frequency feature domains
Dereverberation in the stft and log mel frequency feature domains
 
Data compression
Data compressionData compression
Data compression
 
Asee gsw 2000
Asee gsw 2000Asee gsw 2000
Asee gsw 2000
 
Compression
CompressionCompression
Compression
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio files
 
Fft analysis
Fft analysisFft analysis
Fft analysis
 
Fft analysis
Fft analysisFft analysis
Fft analysis
 
Why Graphics Is Fast, and What It Can Teach Us About Parallel Programming
Why Graphics Is Fast, and What It Can Teach Us About Parallel ProgrammingWhy Graphics Is Fast, and What It Can Teach Us About Parallel Programming
Why Graphics Is Fast, and What It Can Teach Us About Parallel Programming
 
Compression
CompressionCompression
Compression
 
Fast Fourier Transform Analysis
Fast Fourier Transform AnalysisFast Fourier Transform Analysis
Fast Fourier Transform Analysis
 
Matlab: Speech Signal Analysis
Matlab: Speech Signal AnalysisMatlab: Speech Signal Analysis
Matlab: Speech Signal Analysis
 
Audio Processing
Audio ProcessingAudio Processing
Audio Processing
 
Mathematical description of ofdm
Mathematical description of ofdmMathematical description of ofdm
Mathematical description of ofdm
 

Destacado

Pds 2011 3-balotario de preguntas pc2
Pds 2011 3-balotario de preguntas pc2Pds 2011 3-balotario de preguntas pc2
Pds 2011 3-balotario de preguntas pc2jcbenitezp
 
Utp pds_s5y6_sistemas_lit
 Utp pds_s5y6_sistemas_lit Utp pds_s5y6_sistemas_lit
Utp pds_s5y6_sistemas_litjcbenitezp
 
Utp pds_sl3_procesamiento de señales con mat_lab i
 Utp pds_sl3_procesamiento de señales con mat_lab i Utp pds_sl3_procesamiento de señales con mat_lab i
Utp pds_sl3_procesamiento de señales con mat_lab ijcbenitezp
 
Syllabus procesamiento digital de señale_sjc
 Syllabus procesamiento digital de señale_sjc Syllabus procesamiento digital de señale_sjc
Syllabus procesamiento digital de señale_sjcjcbenitezp
 
Utp pds_sl2_señales con mat_lab
 Utp pds_sl2_señales con mat_lab Utp pds_sl2_señales con mat_lab
Utp pds_sl2_señales con mat_labjcbenitezp
 
Utp pds_l5_transformada discreta de fourier
 Utp pds_l5_transformada discreta de fourier Utp pds_l5_transformada discreta de fourier
Utp pds_l5_transformada discreta de fourierjcbenitezp
 
Utp pds_s0_generalidades
 Utp pds_s0_generalidades Utp pds_s0_generalidades
Utp pds_s0_generalidadesjcbenitezp
 
Utp pti_s8y9_punteros
 Utp pti_s8y9_punteros Utp pti_s8y9_punteros
Utp pti_s8y9_punterosjcbenitezp
 
Utp pds_s11_filtros [modo de compatibilidad]
 Utp pds_s11_filtros [modo de compatibilidad] Utp pds_s11_filtros [modo de compatibilidad]
Utp pds_s11_filtros [modo de compatibilidad]jcbenitezp
 
Utp pds_s7y8_dft y fft
 Utp pds_s7y8_dft y fft Utp pds_s7y8_dft y fft
Utp pds_s7y8_dft y fftjcbenitezp
 
Speech signal processing lizy
Speech signal processing lizySpeech signal processing lizy
Speech signal processing lizyLizy Abraham
 
DIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSINGDIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSINGSnehal Hedau
 
Image processing
Image processingImage processing
Image processingVarun Raj
 
NANOTECHNOLOGY AND IT'S APPLICATIONS
NANOTECHNOLOGY AND IT'S APPLICATIONSNANOTECHNOLOGY AND IT'S APPLICATIONS
NANOTECHNOLOGY AND IT'S APPLICATIONSCHINMOY PAUL
 

Destacado (20)

Pds 2011 3-balotario de preguntas pc2
Pds 2011 3-balotario de preguntas pc2Pds 2011 3-balotario de preguntas pc2
Pds 2011 3-balotario de preguntas pc2
 
Utp pds_s5y6_sistemas_lit
 Utp pds_s5y6_sistemas_lit Utp pds_s5y6_sistemas_lit
Utp pds_s5y6_sistemas_lit
 
Utp pds_sl3_procesamiento de señales con mat_lab i
 Utp pds_sl3_procesamiento de señales con mat_lab i Utp pds_sl3_procesamiento de señales con mat_lab i
Utp pds_sl3_procesamiento de señales con mat_lab i
 
Syllabus procesamiento digital de señale_sjc
 Syllabus procesamiento digital de señale_sjc Syllabus procesamiento digital de señale_sjc
Syllabus procesamiento digital de señale_sjc
 
Utp pds_sl2_señales con mat_lab
 Utp pds_sl2_señales con mat_lab Utp pds_sl2_señales con mat_lab
Utp pds_sl2_señales con mat_lab
 
Utp pds_l5_transformada discreta de fourier
 Utp pds_l5_transformada discreta de fourier Utp pds_l5_transformada discreta de fourier
Utp pds_l5_transformada discreta de fourier
 
Utp pds_s0_generalidades
 Utp pds_s0_generalidades Utp pds_s0_generalidades
Utp pds_s0_generalidades
 
Utp pti_s8y9_punteros
 Utp pti_s8y9_punteros Utp pti_s8y9_punteros
Utp pti_s8y9_punteros
 
Utp pds_s11_filtros [modo de compatibilidad]
 Utp pds_s11_filtros [modo de compatibilidad] Utp pds_s11_filtros [modo de compatibilidad]
Utp pds_s11_filtros [modo de compatibilidad]
 
Utp pds_s7y8_dft y fft
 Utp pds_s7y8_dft y fft Utp pds_s7y8_dft y fft
Utp pds_s7y8_dft y fft
 
Speech Signal Processing
Speech Signal ProcessingSpeech Signal Processing
Speech Signal Processing
 
Nano-electronics
Nano-electronicsNano-electronics
Nano-electronics
 
Satellite Systems
Satellite SystemsSatellite Systems
Satellite Systems
 
Speech signal processing lizy
Speech signal processing lizySpeech signal processing lizy
Speech signal processing lizy
 
Nano technology
Nano technologyNano technology
Nano technology
 
DIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSINGDIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSING
 
Dsp ppt
Dsp pptDsp ppt
Dsp ppt
 
Image processing
Image processingImage processing
Image processing
 
Zigbee Presentation
Zigbee PresentationZigbee Presentation
Zigbee Presentation
 
NANOTECHNOLOGY AND IT'S APPLICATIONS
NANOTECHNOLOGY AND IT'S APPLICATIONSNANOTECHNOLOGY AND IT'S APPLICATIONS
NANOTECHNOLOGY AND IT'S APPLICATIONS
 

Similar a ECE 4680 DSP Lab 2: Speed Up or Slow Down Speech

TinyML - 4 speech recognition
TinyML - 4 speech recognition TinyML - 4 speech recognition
TinyML - 4 speech recognition 艾鍗科技
 
Miniproject audioenhancement-100223094301-phpapp02
Miniproject audioenhancement-100223094301-phpapp02Miniproject audioenhancement-100223094301-phpapp02
Miniproject audioenhancement-100223094301-phpapp02mohankota
 
Fyp Final Presentation E1 Tapping
Fyp Final Presentation E1 TappingFyp Final Presentation E1 Tapping
Fyp Final Presentation E1 TappingFacebook Guru
 
igorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reportsigorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reportsIgor Freire
 
3 f3 3_fast_ fourier_transform
3 f3 3_fast_ fourier_transform3 f3 3_fast_ fourier_transform
3 f3 3_fast_ fourier_transformWiw Miu
 
chapter5-Filter Implementation-pp32.pptx
chapter5-Filter Implementation-pp32.pptxchapter5-Filter Implementation-pp32.pptx
chapter5-Filter Implementation-pp32.pptxHarsh539534
 
Digital Tuner
Digital TunerDigital Tuner
Digital Tunerplun
 
Titan X Research Paper
Titan X Research PaperTitan X Research Paper
Titan X Research PaperJennifer Wood
 
Reversible Digital Watermarking of Audio Wav Signal Using Additive Interpolat...
Reversible Digital Watermarking of Audio Wav Signal Using Additive Interpolat...Reversible Digital Watermarking of Audio Wav Signal Using Additive Interpolat...
Reversible Digital Watermarking of Audio Wav Signal Using Additive Interpolat...ijsrd.com
 
Introductory Lecture to Audio Signal Processing
Introductory Lecture to Audio Signal ProcessingIntroductory Lecture to Audio Signal Processing
Introductory Lecture to Audio Signal ProcessingAngelo Salatino
 
Algorithmic Music Generation
Algorithmic Music GenerationAlgorithmic Music Generation
Algorithmic Music GenerationPadmaja Bhagwat
 

Similar a ECE 4680 DSP Lab 2: Speed Up or Slow Down Speech (20)

Signal Processing Assignment Help
Signal Processing Assignment HelpSignal Processing Assignment Help
Signal Processing Assignment Help
 
TinyML - 4 speech recognition
TinyML - 4 speech recognition TinyML - 4 speech recognition
TinyML - 4 speech recognition
 
Mini Project- Audio Enhancement
Mini Project- Audio EnhancementMini Project- Audio Enhancement
Mini Project- Audio Enhancement
 
Miniproject audioenhancement-100223094301-phpapp02
Miniproject audioenhancement-100223094301-phpapp02Miniproject audioenhancement-100223094301-phpapp02
Miniproject audioenhancement-100223094301-phpapp02
 
Lec2
Lec2Lec2
Lec2
 
Fyp Final Presentation E1 Tapping
Fyp Final Presentation E1 TappingFyp Final Presentation E1 Tapping
Fyp Final Presentation E1 Tapping
 
igorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reportsigorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reports
 
3 f3 3_fast_ fourier_transform
3 f3 3_fast_ fourier_transform3 f3 3_fast_ fourier_transform
3 f3 3_fast_ fourier_transform
 
chapter5-Filter Implementation-pp32.pptx
chapter5-Filter Implementation-pp32.pptxchapter5-Filter Implementation-pp32.pptx
chapter5-Filter Implementation-pp32.pptx
 
Speaker Segmentation (2006)
Speaker Segmentation (2006)Speaker Segmentation (2006)
Speaker Segmentation (2006)
 
Real time signal processing
Real time signal processingReal time signal processing
Real time signal processing
 
add9.5.ppt
add9.5.pptadd9.5.ppt
add9.5.ppt
 
Res701 research methodology fft1
Res701 research methodology fft1Res701 research methodology fft1
Res701 research methodology fft1
 
Digital Tuner
Digital TunerDigital Tuner
Digital Tuner
 
Titan X Research Paper
Titan X Research PaperTitan X Research Paper
Titan X Research Paper
 
Mixer v1.0.3
Mixer v1.0.3Mixer v1.0.3
Mixer v1.0.3
 
Reversible Digital Watermarking of Audio Wav Signal Using Additive Interpolat...
Reversible Digital Watermarking of Audio Wav Signal Using Additive Interpolat...Reversible Digital Watermarking of Audio Wav Signal Using Additive Interpolat...
Reversible Digital Watermarking of Audio Wav Signal Using Additive Interpolat...
 
Introductory Lecture to Audio Signal Processing
Introductory Lecture to Audio Signal ProcessingIntroductory Lecture to Audio Signal Processing
Introductory Lecture to Audio Signal Processing
 
Arithmetic Coding
Arithmetic CodingArithmetic Coding
Arithmetic Coding
 
Algorithmic Music Generation
Algorithmic Music GenerationAlgorithmic Music Generation
Algorithmic Music Generation
 

Más de jcbenitezp

Cap4 jc benitez
Cap4 jc benitezCap4 jc benitez
Cap4 jc benitezjcbenitezp
 
Tarea 1 tesis i filosofia y conocimiento
Tarea 1 tesis i filosofia y conocimientoTarea 1 tesis i filosofia y conocimiento
Tarea 1 tesis i filosofia y conocimientojcbenitezp
 
It526 2017 2 ep
It526 2017 2 epIt526 2017 2 ep
It526 2017 2 epjcbenitezp
 
Uni rdsi 2016 1 sesion 13-14 redes moviles 4 g
Uni rdsi 2016 1 sesion 13-14 redes moviles 4 gUni rdsi 2016 1 sesion 13-14 redes moviles 4 g
Uni rdsi 2016 1 sesion 13-14 redes moviles 4 gjcbenitezp
 
Uni rdsi 2016 1 sesion 12 redes moviles 3 g
Uni rdsi 2016 1 sesion 12 redes moviles 3 gUni rdsi 2016 1 sesion 12 redes moviles 3 g
Uni rdsi 2016 1 sesion 12 redes moviles 3 gjcbenitezp
 
It526 2015 2 pc3
It526 2015 2 pc3 It526 2015 2 pc3
It526 2015 2 pc3 jcbenitezp
 
Calendario academico 2015 02 g
Calendario academico 2015   02 gCalendario academico 2015   02 g
Calendario academico 2015 02 gjcbenitezp
 
Db vsa-011 registro de asistencia docente ago2015
Db vsa-011 registro de asistencia docente  ago2015Db vsa-011 registro de asistencia docente  ago2015
Db vsa-011 registro de asistencia docente ago2015jcbenitezp
 
Utp 2015-2_pdi_lab3
 Utp 2015-2_pdi_lab3 Utp 2015-2_pdi_lab3
Utp 2015-2_pdi_lab3jcbenitezp
 
Utp sirn_2015-2 lab3
 Utp sirn_2015-2 lab3 Utp sirn_2015-2 lab3
Utp sirn_2015-2 lab3jcbenitezp
 
Pdi paterno m_lab2c
Pdi paterno m_lab2cPdi paterno m_lab2c
Pdi paterno m_lab2cjcbenitezp
 
Utp 2015-2_sirn_s7_r_competitivas
 Utp 2015-2_sirn_s7_r_competitivas Utp 2015-2_sirn_s7_r_competitivas
Utp 2015-2_sirn_s7_r_competitivasjcbenitezp
 
Utp 2015-2_sirn_s7_r_competitivas
 Utp 2015-2_sirn_s7_r_competitivas Utp 2015-2_sirn_s7_r_competitivas
Utp 2015-2_sirn_s7_r_competitivasjcbenitezp
 
Utp 2015-2_sirn_s6_adaline y backpropagation
 Utp 2015-2_sirn_s6_adaline y backpropagation Utp 2015-2_sirn_s6_adaline y backpropagation
Utp 2015-2_sirn_s6_adaline y backpropagationjcbenitezp
 
Utp ia_s1_introduccion ia
 Utp ia_s1_introduccion ia Utp ia_s1_introduccion ia
Utp ia_s1_introduccion iajcbenitezp
 
Utp sirn_s1_introduccion ia 2014-2
 Utp sirn_s1_introduccion ia 2014-2 Utp sirn_s1_introduccion ia 2014-2
Utp sirn_s1_introduccion ia 2014-2jcbenitezp
 
Utp sirn_s1_introduccion ia 2014-2
 Utp sirn_s1_introduccion ia 2014-2 Utp sirn_s1_introduccion ia 2014-2
Utp sirn_s1_introduccion ia 2014-2jcbenitezp
 
Utp sirn_2014-1 lab1
 Utp sirn_2014-1 lab1 Utp sirn_2014-1 lab1
Utp sirn_2014-1 lab1jcbenitezp
 
Utp sirn_s1_introduccion ia 2014-2
 Utp sirn_s1_introduccion ia 2014-2 Utp sirn_s1_introduccion ia 2014-2
Utp sirn_s1_introduccion ia 2014-2jcbenitezp
 
Inteligencia artificial
Inteligencia artificialInteligencia artificial
Inteligencia artificialjcbenitezp
 

Más de jcbenitezp (20)

Cap4 jc benitez
Cap4 jc benitezCap4 jc benitez
Cap4 jc benitez
 
Tarea 1 tesis i filosofia y conocimiento
Tarea 1 tesis i filosofia y conocimientoTarea 1 tesis i filosofia y conocimiento
Tarea 1 tesis i filosofia y conocimiento
 
It526 2017 2 ep
It526 2017 2 epIt526 2017 2 ep
It526 2017 2 ep
 
Uni rdsi 2016 1 sesion 13-14 redes moviles 4 g
Uni rdsi 2016 1 sesion 13-14 redes moviles 4 gUni rdsi 2016 1 sesion 13-14 redes moviles 4 g
Uni rdsi 2016 1 sesion 13-14 redes moviles 4 g
 
Uni rdsi 2016 1 sesion 12 redes moviles 3 g
Uni rdsi 2016 1 sesion 12 redes moviles 3 gUni rdsi 2016 1 sesion 12 redes moviles 3 g
Uni rdsi 2016 1 sesion 12 redes moviles 3 g
 
It526 2015 2 pc3
It526 2015 2 pc3 It526 2015 2 pc3
It526 2015 2 pc3
 
Calendario academico 2015 02 g
Calendario academico 2015   02 gCalendario academico 2015   02 g
Calendario academico 2015 02 g
 
Db vsa-011 registro de asistencia docente ago2015
Db vsa-011 registro de asistencia docente  ago2015Db vsa-011 registro de asistencia docente  ago2015
Db vsa-011 registro de asistencia docente ago2015
 
Utp 2015-2_pdi_lab3
 Utp 2015-2_pdi_lab3 Utp 2015-2_pdi_lab3
Utp 2015-2_pdi_lab3
 
Utp sirn_2015-2 lab3
 Utp sirn_2015-2 lab3 Utp sirn_2015-2 lab3
Utp sirn_2015-2 lab3
 
Pdi paterno m_lab2c
Pdi paterno m_lab2cPdi paterno m_lab2c
Pdi paterno m_lab2c
 
Utp 2015-2_sirn_s7_r_competitivas
 Utp 2015-2_sirn_s7_r_competitivas Utp 2015-2_sirn_s7_r_competitivas
Utp 2015-2_sirn_s7_r_competitivas
 
Utp 2015-2_sirn_s7_r_competitivas
 Utp 2015-2_sirn_s7_r_competitivas Utp 2015-2_sirn_s7_r_competitivas
Utp 2015-2_sirn_s7_r_competitivas
 
Utp 2015-2_sirn_s6_adaline y backpropagation
 Utp 2015-2_sirn_s6_adaline y backpropagation Utp 2015-2_sirn_s6_adaline y backpropagation
Utp 2015-2_sirn_s6_adaline y backpropagation
 
Utp ia_s1_introduccion ia
 Utp ia_s1_introduccion ia Utp ia_s1_introduccion ia
Utp ia_s1_introduccion ia
 
Utp sirn_s1_introduccion ia 2014-2
 Utp sirn_s1_introduccion ia 2014-2 Utp sirn_s1_introduccion ia 2014-2
Utp sirn_s1_introduccion ia 2014-2
 
Utp sirn_s1_introduccion ia 2014-2
 Utp sirn_s1_introduccion ia 2014-2 Utp sirn_s1_introduccion ia 2014-2
Utp sirn_s1_introduccion ia 2014-2
 
Utp sirn_2014-1 lab1
 Utp sirn_2014-1 lab1 Utp sirn_2014-1 lab1
Utp sirn_2014-1 lab1
 
Utp sirn_s1_introduccion ia 2014-2
 Utp sirn_s1_introduccion ia 2014-2 Utp sirn_s1_introduccion ia 2014-2
Utp sirn_s1_introduccion ia 2014-2
 
Inteligencia artificial
Inteligencia artificialInteligencia artificial
Inteligencia artificial
 

Último

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Último (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

ECE 4680 DSP Lab 2: Speed Up or Slow Down Speech

  • 1. ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions This lab is to be worked in teams of most two. Each team will submit a lab report describing their results. An E-mail ZIP package containing .wav files will also be turned in or a lab demo to the instructor, to allow evaluation of the processing algorithms. The lab due date is 4:30 PM Thurs- day, September 17, 2009. Introduction Using a basic PC sound system and MATLAB wave file processing functions, near real-time audio signal processing can be investigated. In this experiment you will become familiar with *.wav files and MATLAB functions for reading and writing wave files from the MATLAB work space. The basic investigation for this experiment will be the use of butt splicing to either speed up or slow down the playing time (delivery) of a recorded speech signal (in MATLAB a vector), without altering the pitch. Think about this for a moment. If a signal is played back at a sampling rate of twice the original record value, the play back time is cut in half, and the pitch is doubled. Likewise if a signal is played back at a sampling rate of one half the original record value, the play back time is doubled, and the pitch is halved. Using butt splicing of speech segments it is possible to maintain the recorded pitch while either slowing down or speeding up the play back time. Digital Signal Processing and Windows Wave Files With the multimedia enhancements to Windows came the ability to handle digitized audio signals in what is known as the wave (*.wav) file format. A Wave audio file is a binary file format for storing continuous-time audio source material, in sampled data form, as a result analog-to-digital (A/D) conversion. A sound system equipped PC generally includes two channels for recording and two digital-to-analog (D/A) converters for play back. The block diagram of Figure 1 depicts the DSP capability that a sound system equipped PC typically has. The current DSP capability connected with wave file manipulation is not geared toward real- time processing. It is best suited to what one might call near real-time signal processing. Signals can be processed after being initially recorded, then saved as a new wave file for play back at another time. Wave Files and Sound in MATLAB The vector signal processing capabilities of MATLAB make it ideally suited for post processing, or Introduction 1
  • 2. ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions Near Real-Time DSP Using C/C++, multimedia tool, other, e.g., MATLAB A/D D/A Conversion Conversion 8 or 16 bits 8 or 16 bits RAM or Hard Disk From PC Fs Storage as Fs To PC Microphone *.wav Speakers File A/D D/A Conversion Conversion 8 or 16 bits 8 or 16 bits Fs Fs Sampling Rate Choices: Fs = 8, 11.025, 22.05, or 44.1 kHz Figure 1: DSP capability of the typical sound card equipped PC. if you wish, near real-time processing, of windows wave files. There are four sound processing functions for a windows PC. Two functions are used in the playing of MATLAB vectors (matrices) through the PC sound board, while the other two are used to read and write wave files to and from the MATLAB workspace. The functions are summarized in Table 1. Table 1: MATLAB sound functions for Win/Mac/Linux OS’s. MATLAB Sound Related Functions sound(y,Fs) Convert a vector into sound and play at sampling rate Fs. Amplitude values must lie between -1 and +1. soundsc(y,Fs) Convert a vector into sound and play at sampling rate Fs with automatic amplitude scaling. [y, Fs, nbits] = Load windows wav format sound file into workspace wavread(fname) variable y. Also returns sampling rate and bits/sample. wavwrite(y,Fs, Writes the data stored in the variable y to a WAVE file fname) called fname. As Figure 1 indicates *.wav files have many variations, ranging from single channel audio Wave Files and Sound in MATLAB 2
  • 3. ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions recorded with 8-bits at F s = 8 ksps, up to the more memory intensive two channel (stereo) audio recorded with 16-bits per channel at F s = 44.1 ksps. The MATLAB sound functions support all of this capability and allow a variable sample rate. To read a pre-recorded *.wav file simply type >>[y, Fs] = wavread(‘name.wav’; The audio signal is stored in the column vector y and sampling rate used to make the recording is returned to variable Fs. To play the sound vector from within the MATLAB environment simply type >> sound(y, Fs) where Fs may be altered from the nominal record value to speed up or slow down the vector play- ing time. For this experiment a nominal sampling rate of 11.025 kHz is recommended. An interesting feature of the sound function is that it will also play MATLAB matrices, column- by-column. This capability will be useful, and you will verify this in the experiments. Simple Rate Changing Independent of Pitch Without getting too detailed this section explains a simple technique for either increasing or decreasing the playing time of a sound vector, without altering the sound pitch. Increasing the rate refers to decreasing the playing time, while decreasing the rate implies increasing the playing time. Both operations can be solved in an approximate way by butt splicing speech segments of say 45 ms or so. Butt splicing in DSP is analogous to adding or removing segments of magnetic recording tape by end-to-end taping them together to form a new edited tape. Butt splicing of speech sequences thus implies that no transition smoothing is used, just a hard end-to-end connec- tion. Decreasing Playback Time To decrease the playback time, yet retain the proper pitch, all we need do is to periodically remove short segments of the original speech vector, butt splice the remaining pieces back together, then play it back at the original recording rate. If the pattern is save 45 ms, discard 45 ms, save 45 ms, etc., the new sound vector will be half as long as the original, thus it will play in half the time. A graphical description of the operation in terms of MATLAB matrices is shown in Figure 2. The seg- ment length may need to be adjusted for best sound quality. Increasing Playback Time To increase the playback time, yet retain the proper pitch, all we need do is to periodically repeat short segments of the original speech vector, again using a butt splicing technique, then play it back at the original recording rate. If the pattern is say 45 ms, repeat previous 45 ms, save next 45 ms, etc., the new sound vector will be twice as long as the original, thus it will play in twice the time. A graphical description of the operation in terms of MATLAB matrices is shown in Figure 3. Again, the segment length may need to be adjusted for best sound quality. Simple Rate Changing Independent of Pitch 3
  • 4. ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions Input tstart =0 Speech 1 Vector y 45 ms 2 Reshape 1 2 3 4 ... M 3 Parse 4 ... 1 3 5 7 ... M M tstop Figure 2: Butt splicing to decreasing playing time yet maintain sound pitch. MATLAB Hint: >> A = [1 2; 3 4] A = 1 2 3 4 >> [A A] ans = 1 2 1 2 3 4 3 4 >> [A' A'] ans = 1 3 1 3 2 4 2 4 >> [A' A']' ans = 1 2 3 4 1 2 3 4 Simple Rate Changing Independent of Pitch 4
  • 5. ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions Input tstart =0 Speech 1 Vector y 45 ms 2 Reshape 1 2 3 4 ... M 45 ms 3 Concat. 4 ... 45 ms 1 2 3 4 M ... M 45 ms 1 2 3 4 M tstop 90 ms Figure 3: Butt splicing to increase playing time yet maintain sound pitch. Experiments 1. Create a short wave file using 16 bits per sample resolution, F s = 11.025 ksps, and dura- tion of about 30 seconds, using GoldWave or a similar wave recording application. 2. Import the wave file into the MATLAB workspace using the function >> [y, Fs] = wavread(‘name.wav’); 3. Verify that sound(y,Fs) plays the vector through the sound system, and that raising or lowering Fs changes both the duration and pitch of the message. Using the length of y and Fs determine the exact time duration of the played sound vector. 4. Verify that MATLAB plays a matrix by columns. First convert the vector y into a matrix using >> reshape(y, M, N), where M*N = length(y). Then play the matrix using sound. Verify that scrambled speech is heard if you play the transpose of your matrix. 5. Butt splice y by removing alternate 45 ms speech segments to halve the delivery time and maintain the same pitch. Export your modified speech vector back into a wave file and ver- Experiments 5
  • 6. ECE 4680 DSP Laboratory 2: Speech Signal Processing Using MATLAB Sound Functions ify that it is playable. 6. Butt splice y by inserting redundant 45 ms speech segments to double the delivery time and maintain the same pitch. Export your modified speech vector back into a wave file and ver- ify that it is playable. 7. Try variations on 5 and 6 to improve the quality, or further alter the rate change. 8. Analyze your speech waveforms using the spectrogram function >> spectrogram(y,FFTLENGTH,Fs,[WIND],OVERLAP) Recall from ECE 2610 that a spectrogram is a frequency spectrum versus time plot. 9. Summarize your findings. 10. Prepare for instructor demo. Bibliography/References [1] Tim Kientzle, A Programmers Guide to Sound, Addison-Wesley, Reading, Ma, 1998. Bibliography/References 6