Digital Signal Processing January 16, 2014 Analog and Digital In “reality”, sound is analog. variations in air pressure are continuous = it has an amplitude.

Slides:



Advertisements
Similar presentations
Analog to digital conversion
Advertisements

Acoustic/Prosodic Features
Analog Representations of Sound Magnified phonograph grooves, viewed from above: When viewed from the side, channel 1 goes up and down, and channel 2 goes.
A Phonetician ’ s Guide to Audio Formats Chilin Shih University of Illinois at Urbana Champaign LSA 2006January 5-8, 2006.
Digital Signal Processing
Analogue to Digital Conversion (PCM and DM)
SWE 423: Multimedia Systems Chapter 3: Audio Technology (2)
Analog to Digital Conversion. 12 bit vs 16 bit A/D Card Input Volts = A/D 12 bit 2 12 = Volts = Volts = 2048 −10 Volts = 0 Input Volts.
SIMS-201 Characteristics of Audio Signals Sampling of Audio Signals Introduction to Audio Information.
IT-101 Section 001 Lecture #8 Introduction to Information Technology.
CHAPTER 5 Discrete Sampling and Analysis of Time-Varying Signals Analog recording systems, which can record signals continuously in time, digital data-acquisition.
Image and Sound Editing Raed S. Rasheed Sound What is sound? How is sound recorded? How is sound recorded digitally ? How does audio get digitized.
Pitch Tracking + Prosody January 20, 2009 The Plan for Today One announcement: On Thursday, we’ll meet in the Tri-Faculty Computer Lab (SS 018) Section.
Overview What is in a speech signal?
Chapter 2 Fundamentals of Data and Signals
Chapter 2: Fundamentals of Data and Signals. 2 Objectives After reading this chapter, you should be able to: Distinguish between data and signals, and.
1 Chapter 2 Fundamentals of Data and Signals Data Communications and Computer Networks: A Business User’s Approach.
Chapter 4 Digital Transmission
Sampling Theory. Time domain Present a recurring phenomena as amplitude vs. time  Sine Wave.
Digital Audio Multimedia Systems (Module 1 Lesson 1)
 Principles of Digital Audio. Analog Audio  3 Characteristics of analog audio signals: 1. Continuous signal – single repetitive waveform 2. Infinite.
Basic Acoustics + Digital Signal Processing September 11, 2014.
Basics of Signal Processing. frequency = 1/T  speed of sound × T, where T is a period sine wave period (frequency) amplitude phase.
Source/Filter Theory and Vowels February 4, 2010.
Digital audio. In digital audio, the purpose of binary numbers is to express the values of samples that represent analog sound. (contrasted to MIDI binary.
LE 460 L Acoustics and Experimental Phonetics L-13
Digital Audio What do we mean by “digital”? How do we produce, process, and playback? Why is physics important? What are the limitations and possibilities?
Computer Science 121 Scientific Computing Winter 2014 Chapter 13 Sounds and Signals.
Fall 2004EE 3563 Digital Systems Design Audio Basics  Analog to Digital Conversion  Sampling Rate  Quantization  Aliasing  Digital to Analog Conversion.
Lab #8 Follow-Up: Sounds and Signals* * Figures from Kaplan, D. (2003) Introduction to Scientific Computation and Programming CLI Engineering.
Basics of Signal Processing. SIGNALSOURCE RECEIVER describe waves in terms of their significant features understand the way the waves originate effect.
Data Communications & Computer Networks, Second Edition1 Chapter 2 Fundamentals of Data and Signals.
Computing with Digital Media: A Study of Humans and Technology Mark Guzdial, School of Interactive Computing.
COMP Representing Sound in a ComputerSound Course book - pages
Automatic Pitch Tracking September 18, 2014 The Digitization of Pitch The blue line represents the fundamental frequency (F0) of the speaker’s voice.
Art 321 Sound, Audio, Acoustics Dr. J. Parker. Sound What we hear as sound is caused by rapid changes in air pressure! It is thought of as a wave, but.
Resonance, Revisited March 4, 2013 Leading Off… Project report #3 is due! Course Project #4 guidelines to hand out. Today: Resonance Before we get into.
CSC361/661 Digital Media Spring 2002
Announcements Chapter 11 for today No quiz this week Instructor got behind…. We'll be back in MGH389 on Friday.
Automatic Pitch Tracking January 16, 2013 The Plan for Today One announcement: Starting on Monday of next week, we’ll meet in Craigie Hall D 428 We’ll.
Digital Recording Theory Using Peak. Listening James Tenney, Collage #1 (“Blue Suede”),  Available in Bracken Library, on James Tenney Selected.
Acoustic Analysis of Speech Robert A. Prosek, Ph.D. CSD 301 Robert A. Prosek, Ph.D. CSD 301.
British Computer Society (BCS)
Georgia Institute of Technology Introduction to Processing Digital Sounds part 1 Barb Ericson Georgia Institute of Technology Sept 2005.
Pitch Tracking + Prosody January 17, 2012 The Plan for Today One announcement: On Thursday, we’ll meet in the Craigie Hall D 428 We’ll be working on.
Sound Conversion Chilin Shih University of Illinois — Urbana Champaign E-MELD Conference 2003 July 11 th -13th LSA Institute Michigan State University.
Frequency, Pitch, Tone and Length October 16, 2013 Thanks to Chilin Shih for making some of these lecture materials available.
1 Introduction to Information Technology LECTURE 6 AUDIO AS INFORMATION IT 101 – Section 3 Spring, 2005.
1 Chapter 2 Fundamentals of Data and Signals Data Communications and Computer Networks: A Business User’s Approach.
Resonance October 23, 2014 Leading Off… Don’t forget: Korean stops homework is due on Tuesday! Also new: mystery spectrograms! Today: Resonance Before.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 3 – Digital Audio Representation Klara Nahrstedt Spring 2009.
1 Rev 07/28/2015.  Describe: examples, definition,? 2.
Frequency, Pitch, Tone and Length February 12, 2014 Thanks to Chilin Shih for making some of these lecture materials available.
Resonance January 28, 2010 Last Time We discussed the difference between sine waves and complex waves. Complex waves can always be understood as combinations.
1 Manipulating Audio. 2 Why Digital Audio  Analogue electronics are always prone to noise time amplitude.
Intro-Sound-part1 Introduction to Processing Digital Sounds part 1 Barb Ericson Georgia Institute of Technology Oct 2009.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 3 – Digital Audio Representation Klara Nahrstedt Spring 2014.
1 What is Multimedia? Multimedia can have a many definitions Multimedia means that computer information can be represented through media types: – Text.
Session 18 The physics of sound and the manipulation of digital sounds.
Lifecycle from Sound to Digital to Sound. Characteristics of Sound Amplitude Wavelength (w) Frequency ( ) Timbre Hearing: [20Hz – 20KHz] Speech: [200Hz.
Multimedia: making it Work
Multimedia Systems and Applications
4.1 Chapter 4 Digital Transmission Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
High Resolution Digital Audio
Acoustics of Speech Julia Hirschberg CS /7/2018.
Analyzing the Speech Signal
Analyzing the Speech Signal
Digital Control Systems Waseem Gulsher
Acoustics of Speech Julia Hirschberg CS /2/2019.
COMS 161 Introduction to Computing
Presentation transcript:

Digital Signal Processing January 16, 2014

Analog and Digital In “reality”, sound is analog. variations in air pressure are continuous = it has an amplitude value at all points in time. and there are an infinite number of possible air pressure values. Back in the bad old days, acoustic phonetics was strictly an analog endeavor. analog clock

Analog and Digital In the good new days, we can represent sound digitally in a computer.  In a computer, sounds must be discrete. everything = 1 or 0 digital clock Computers represent sounds as sequences of discrete pressure values at separate points in time. Finite number of pressure values. Finite number of points in time.

Analog-to-Digital Conversion Recording sounds onto a computer requires an analog-to- digital conversion (A-to-D) When computers record sound, they need to digitize analog readings in two dimensions: X: Time (this is called sampling) Y: Amplitude (this is called quantization) sampling quantization

Sampling Example Thanks to Chilin Shih for making these materials available.

Sampling Example

Sampling Rate Sampling rate = frequency at which samples are taken. What’s a good sampling rate for speech? Typical options include: Hz, Hz, Hz sometimes even Hz and Hz Higher sampling rate preserves sound quality. Lower sampling rate saves disk space. (which is no longer much of an issue) Young, healthy human ears are sensitive to sounds from 20 Hz to 20,000 Hz

One Consideration The Nyquist Frequency = highest frequency component that can be captured with a given sampling rate = one-half the sampling rate Problematic Example: 100 Hz sound 100 Hz sampling rate samples Harry Nyquist ( )

Nyquist’s Implication An adequate sampling rate has to be… at least twice as much as any frequency components in the signal that you’d like to capture. 100 Hz sound 200 Hz sampling rate samples

Sampling Rate Demo Speech should be sampled at at least Hz (although there is little frequency information in speech above 10,000 Hz) Hz Hz Hz (watch out for [s]) 8000 Hz 5000 Hz

Another Problem When the continuous sound signal completes more than one cycle in between samples, a phenomenon called aliasing occurs. The digital signal then contains a low frequency component which is not in the analog signal.

The Aliasing Solution: Filtering Whenever sound is digitized, frequencies above the Nyquist frequency need to be filtered out of the end product. E.g., CDs digitize at a Hz sampling rate… And filter out any components over Hz. “Low-pass filters” allow low frequencies to pass through the filter. and remove high frequencies from the signal. Cf. “high-pass” filters: allow high frequencies to pass through filter.

Low-Pass Filter in Action Power spectrum of 100 Hz Hz combo: Filter passes 100 Hz component, but not 1000 Hz component.

Digital Dimension #2: Quantization Each sample that is taken has a range of pressure values This range is determined by the number of bits allotted to each sample Remember: in computers, numbers are stored in binary format (sequences of ones and zeroes). Ex: 89 = in 8-bit encoding Typical sample sizes: 8 bits values 12 bits2 12 4,096 values 16 bits ,536 values

Samples Go Small We lose information when the sample size is too small, given the same sampling rate. Sample size here = 2 bits = 2 2 = 4 values

Quantization

Quantization Noise

Sample Size Demo 11k 16 bits 11k 8 bits 8k 16 bits 8k 8bits (telephone) Note: CDs sample at 44,100 Hz and have 16-bit quantization. Also check out bad and actedout examples in Praat.

Quantization Range With 16-bit quantization, we can encode 65,536 different possible amplitude values. Remember that I(dB) = 10 * log 10 (A 2 /r 2 ) Substitute the max and min amplitude values for A and r, respectively, and we get: I(dB) = 10 * log 10 ( /1 2 ) = 96.3 dB Some newer machines have 24-bit quantization-- = 16,777,216 possible amplitude values. I(dB) = 10 * log 10 ( /1 2 ) = dB This is bigger than the range of sounds we can listen to without damaging our hearing.

Problem: Clipping Clipping occurs when the pressure in the analog signal exceeds the sample size range in digitization Check out sylvester and normal in Praat.

A Note on Formats Digitized sound files come in different formats….wav,.aiff,.au, etc. Lossless formats digitize sound in the way I’ve just described. They only differ in terms of “header” information and specified limits on file size, etc. Lossy formats use algorithms to condense the size of sound files …and the sound file loses information in the process. For instance: the.mp3 format primarily saves space by eliminating some very high frequency information. (which is hard for people to hear)

AIFF vs. MP3.aiff format.mp3 format (digitized at 128 kB/s) This trick can work pretty well…

MP3 vs. MP3.mp3 format (digitized at 128 kB/s).mp3 format (digitized at 64 kB/s).mp3 conversion can induce reverb artifacts, and also cut down on temporal resolution (among other things).

Sound Digitization Summary Samples are taken of an analog sound’s pressure value at a recurring sampling rate. This digitizes the time dimension in a waveform. The sampling frequency needs to be twice as high as any frequency components you want to capture in the signal. E.g., Hz for speech Quantization converts the amplitude value of each sample into a binary number in the computer. This digitizes the amplitude dimension in a waveform. Rounding off errors can lead to quantization noise. Excessive amplitude can lead to clipping errors.

The Digitization of Pitch The blue line represents the fundamental frequency (F0) of the speaker’s voice. Also known as a pitch track How can we automatically “track” F0 in a sample of speech? Praat can give us a representation of speech that looks like:

Pitch Tracking Voicing: Air flow through vocal folds Rapid opening and closing due to Bernoulli Effect Each cycle sends an acoustic shockwave through the vocal tract …which takes the form of a complex wave. The rate at which the vocal folds open and close becomes the fundamental frequency (F0) of a voiced sound.

Voicing Bars

Individual glottal pulses

Voicing = Complex Wave Note: voicing is not perfectly periodic. …always some random variation from one cycle to the next. How can we measure the fundamental frequency of a complex wave?

The basic idea: figure out the period between successive cycles of the complex wave. Fundamental frequency = 1 / period duration = ???

Measuring F0 To figure out where one cycle ends and the next begins… The basic idea is to find how well successive “chunks” of a waveform match up with each other. One period = the length of the chunk that matches up best with the next chunk. Automatic Pitch Tracking parameters to think about: 1.Window size (i.e., chunk size) 2.Step size 3.Frequency range (= period range)

Window (Chunk) Size Here’s an example of a small window

Window (Chunk) Size Here’s an example of a large(r) window

Initial window of the waveform is compared to another window (of the same duration) at a later point in the waveform

Matching The waveforms in the two windows are compared to see how well they match up. Correlation = measure of how well the two windows match ???

Autocorrelation The measure of correlation = Sum of the point-by-point products of the two chunks. The technical name for this is autocorrelation… because two parts of the same wave are being matched up against each other. (“auto” = self)

Autocorrelation Example Ex: consider window x, with n samples… What’s its correlation with window y? (Note: window y must also have n samples) x 1 = first sample of window x x 2 = second sample of window x … x n = nth (final) sample of window x y 1 = first sample of window y, etc. Correlation (R) = x 1 *y 1 + x 2 * y 2 + … + x n * y n The larger R is, the better the correlation.

By the Numbers Sample x y product Sum of products = -.48 These two chunks are poorly correlated with each other.

By the Numbers, part 2 Sample x z product Sum of products = 1.26 These two chunks are well correlated with each other. (or at least better than the previous pair) Note: matching peaks count for more than matches close to 0.

Back to (Digital) Reality The waveforms in the two windows are compared to see how well they match up. Correlation = measure of how well the two windows match ??? These two windows are poorly correlated

Next: the pitch tracking algorithm moves further down the waveform and grabs a new window

The distance the algorithm moves forward in the waveform is called the step size “step”

Matching, again The next window gets compared to the original. ???

Matching, again The next window gets compared to the original. ??? These two windows are also poorly correlated

The algorithm keeps chugging and, eventually… another “step”

Matching, again The best match is found. ??? These two windows are highly correlated

The fundamental period can be determined by the calculating the length of time between the start of window 1 and the start of (well correlated) window 2. period

Frequency is 1 / period Q: How many possible periods does the algorithm need to check? Frequency range (default in Praat: 75 to 600 Hz) Mopping up

Moving on Another comparison window is selected and the whole process starts over again.

would Uhm I like A flight to Seattle from Albuquerque The algorithm ultimately spits out a pitch track. This one shows you the F0 value at each step. Thanks to Chilin Shih for making these materials available

Pitch Tracking in Praat Play with F0 range. Create Pitch Object. Also go To Manipulation…Pitch. Also check out:

Summing Up Pitch tracking uses three parameters 1.Window size Ensures reliability In Praat, the window size is always three times the longest possible period. E.g.: 3 X 1/75 =.04 sec. 2.Step size For temporal precision 3.Frequency range Reduces computational load

Deep Thought Questions What might happen if: The shortest period checked is longer than the fundamental period? AND two fundamental periods fit inside a window? Potential Problem #1: Pitch Halving The pitch tracker thinks the fundamental period is twice as long as it is in reality.  It estimates F0 to be half of its actual value

Pitch Halving pitch is halved Check out normal file in Praat.

More Deep Thoughts What might happen if: The shortest period checked is less than half of the fundamental period? AND the second half of the fundamental cycle is very similar to the first? Potential Problem #2: Pitch doubling The pitch tracker thinks the fundamental period is half as long as it actually is.  It estimates the F0 to be twice as high as it is in reality.

Pitch Doubling pitch is doubled

Microperturbations Another problem: Speech waveforms are partly shaped by the type of segment being produced. Pitch tracking can become erratic at the juncture of two segments. In particular: voiced to voiceless segments sonorants to obstruents These discontinuities in F0 are known as microperturbations. Also: transitions between modal and creaky voicing tend to be problematic.