0% found this document useful (0 votes)
4 views

Digital speech recognition

The document outlines a course on speech processing, detailing its applications, fundamental concepts of digital signal processing (DSP), and various signal classifications. It includes information on course structure, topics to be covered, and essential definitions related to signals, such as analog vs. digital signals, sampling, and quantization. Additionally, it discusses operations on signals and provides examples of signal processing techniques and their applications in different fields.

Uploaded by

fbffn4rjds
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Digital speech recognition

The document outlines a course on speech processing, detailing its applications, fundamental concepts of digital signal processing (DSP), and various signal classifications. It includes information on course structure, topics to be covered, and essential definitions related to signals, such as analog vs. digital signals, sampling, and quantization. Additionally, it discusses operations on signals and provides examples of signal processing techniques and their applications in different fields.

Uploaded by

fbffn4rjds
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 82

Speech Processing

Lecture [1]
By
Dr. Gehad Ismail Sayed
Classroom Code

bznymgc
https://classroom.google.com/c/Njg1OT
I1OTE0ODEw?cjc=bznymgc
Course Work Marking Schema

• Two Assignments (15%)


• Tasks Required in Labs (5%)
• Two Quizes (10%)
• Midterm Exam (20%)
Reference Textbooks
What is speech processing?

• It is the application of digital signal processing (DSP)


techniques to the processing and or analysis of speech
signals
Application of speech processing

• Speaker Verification/Identification
• Speech Enhancement
• Speech Synthesis (Text to Speech Conversion)
• Speech Coding
• Bio-medicine: diagnosis, patient monitoring
• Music: recording, playback, mixing, storage (e.g.CD-
players)
Why this course?

• By the end of the course, you will develop a solid


understanding of DSP fundamentals including:
– Analog vs. digital signal representation and processing
– Why DSP? advantages, limitations and fundamental trade-offs
– Relationship between frequency and time representations
– Analysis and processing of signals in the temporal/spatial as
well as in the frequency domain
– Practical applications of DSP and speech processing
– Implementation of DSP algorithms using MATLAB
Topics to be covered

• Discrete-time signals and systems


• Linear time-invariant (LTI) systems and their properties
• The Z-transform and its application in the analysis of LTI
systems
• Frequency domain representations including Discrete
Fourier transform (DFT) and fast Fourier transform (FFT)
• Design of digital filters (FIR,IIR)
• Feature extraction
• Compression
What is the signal?
• A signal is defined as any physical quantity that varies with time,
space or any other independent variable or variables.

• We describe a signal as function of one or more independent


variables.

‘S1’ is called dependent ‘t’ is called independent


variable variable
What is the signal?
What is digital signal?
• A digital signal is a signal that is being used to represent data as
sequence of discrete values.

• At any given time it can only take on at most one of a finite


number of values.
Analog signal vs. digital signal
Analog Signal Digital Signal
Definition A signal for conveying information which is a A signal which is a discrete function of
continuous function of time is known as analog time, i.e. non-continuous signal, is known
signal. as digital signal.
Typical An analog signal is typically represented by a The typical representation of a signal is
representation sine wave function. given by a square wave function.
Signal The bandwidth of an analog signal is low. The bandwidth of a digital signal is
bandwidth relatively high.

Suitability The analog signals are more suitable for The digital signals are suitable for
transmission of audio, video and other computing and digital electronic operations
information through the communication such as data storage
channels.
Power Analog signals use more power for data Digital signals use less power than analog
consumption transmission. signals for conveying the same amount of
information.
Applications The analog signals are used in land line phones, The digital signals are used in computers,
thermometer, electric fan, volume knob of a keyboards, CD, DVD, digital watches,
radio, etc. smartphones, etc.
What do we mean by processing in signals?

• It is any operation that it performs on the signal to extract


some useful information.
Why DSP?
– Digital data storage and transmission is much more effective than in the
analogue form
– Flexibility: processing functions can be altered or adjusted
– Possibility of implementing much more complicated processing functions
than in analogue devices
– Efficient implementation of fast algorithms and matrix-based processing
– Speed of digital operation tends to grow rapidly with the years of technical
progress
– A very high accuracy and reliability is possible to achieve
– Dynamic range can be increased
– Signal multiplexing: simultaneous (parallel) processing
Sampling
• Sampling: is the process of converting continuous time signal into discrete
time signal by sensing analog signal value at discrete instants of time.
• To convert this discrete time signal back to continuous time signal without
error, there is a condition related to rate at which these samples should be
taken
• If your sampling rate is too low, you may have aliasing problem
– The reconstructed signal has not the same frequency as the original one
Resampling
• There are two different approaches for signal sampling:
– Sampling of continuous time signals
• E.g voice signal
• It deals with infinite number of values
– Sampling of discrete time signals

• Resampling is a technique you can use to standardize the intervals of the


data. It can involve upsampling (increasing the frequency of data points) or
downsampling (decreasing the frequency of data points) to obtain a regular
time-series.
Signal Preprocessing
Signal Preprocessing
Sampling Theorem for Continuous Time Signals
• For perfect reconstruction of a continuous time signal from its samples,
sample rate of sampling frequency should be greater than or equal to
Nyquist rate of the information carrying signal.

• Nyquist rate is defined as minimum sampling rate required for perfect


reconstruction of a continuous-time signal from its samples.
Quantization
• Quantization is the process of mapping continuous amplitude (analog)
signal into discrete amplitude (digital) signal.
• The analog signal is quantized into countable & discrete levels known as
quantization levels. Each of these levels represents a fixed input amplitude.
Representation of Discrete Signals

• Graphical:

• Functional:

• Tabular:

• Sequence: x(n)={−2,3,0,−1,2,3,1}
Signals Classification
• Continuous Time and Discrete Time Signals
• Deterministic and Non-deterministic Signals
• Even and Odd Signals
• Periodic and Aperiodic Signals
• Energy and Power Signals
• Right and Left-Sided Signals
Signals Classification
• Deterministic and Non-deterministic Signals
– A signal is said to be deterministic if there is no uncertainty with respect
to its value at any instant of time. Or, signals which can be defined exactly
by a mathematical formula are known as deterministic signals.
– A signal is said to be non-deterministic if there is uncertainty with
respect to its value at some instant of time. Non-deterministic signals are
random in nature hence they are called random signals. Random signals
cannot be described by a mathematical equation. They are modeled in
probabilistic terms.
Signals Classification
• Even and Odd Signals
– A signal is said to be even when it satisfies the condition x(t) = x(-t)
• Example: Let x(t) = cos(t)
• x(-t) = cos(-t) = -cos(t) = -x(t)

– A signal is said to be odd when it satisfies the


condition x(t) = -x(-t)
• Example: Let x(t) = sin t
• x(-t) = sin(-t) = -sin t = -x(t)

Any function ƒ(t) can be expressed as the sum of its even function 𝒇𝒆 𝒕 and odd function 𝒇𝒐 𝒕 .
ƒ(t ) = 𝒇𝒆 𝒕 + 𝒇𝒐 𝒕 , where 𝒇𝒆 𝒕 = ½[ƒ(t ) +ƒ(-t )] and 𝒇𝒐 𝒕 = ½[ƒ(t ) -ƒ(-t )]
Signals Classification
• Periodic and Aperiodic Signals
– A signal is said to be periodic if it satisfies the condition x(t) = x(t + T) or
x(n) = x(n + N).
Where
• T = fundamental time period,
• 1/T = f = fundamental frequency.

– The below signal will repeat for every time interval 𝑇𝑜 hence it is periodic
with period 𝑇𝑜 .
Sinusoidal signals
Sinusoidal signals
• The phase angle in degrees or radians that the waveform has
shifted either left or right from the reference point.
Signals Classification
• Periodic and Aperiodic Signals
Signals Classification
• Energy and Power Signals
– A signal is said to be energy signal when it has finite energy.

– A signal is said to be power signal when it has finite power.

– NOTE: A signal cannot be both, energy and power simultaneously. Also, a


signal may be neither energy nor power signal.
• Power of energy signal = 0
• Energy of power signal = ∞
Signals Classification

• Right and Left-Sided Signals


– A right-sided signal is zero for t<T
– A left-sided signal is zero for t>T where T can be positive or negative
Discrete Time Signals

• Unit Impulse
– This is represented by the discrete delta function. When n=0,
δ(0)=1, otherwise δ(n)=0
Discrete Time Signals

• Unit Step
– This is represented by the sum of lots of unit impulse, at each
sampling points for n>=0. For n<0, x[n]=0

Shiftted version
Discrete Time Signals

• Unit Step
Operations on Signals

• Signal Addition
– Addition of two signals mean the addition of their corresponding
amplitudes.
Operations on Signals

• Signal Subtraction
– Subtraction of two signals mean the subtraction of their
corresponding amplitudes.
Operations on Signals

• Signal Multiplication
– Multiplication of two signals mean the multiplication of their
corresponding amplitudes.
Operations on Signals

• Signal Scaling
– C x(t) is a amplitude scaled version of x(t) whose amplitude is
scaled by a factor C.
Operations on Signals

• Time Shifting
– x(t ± t0) is time shifted version of the signal x(t).
• x (t + t0) → negative shift
• x (t - t0) → positive shift
Operations on Signals

• Time Shifting
– x(t ± t0) is time shifted version of the signal x(t).
• x (t + t0) → negative shift
• x (t - t0) → positive shift
Operations on Signals

• Time Scaling
– x(At) is time scaled version of the signal x(t). where A is always
positive.
• |A| > 1 → Compression of the signal
• |A| < 1 → Expansion of the signal
Operations on Signals

• Time Scaling
– x(At) is time scaled version of the signal x(t). where A is always
positive.
• |A| > 1 → Compression of the signal
• |A| < 1 → Expansion of the signal
Operations on Signals

• Time Reversal
– x(-t) is the time reversal of the signal x(t).
– The signal y(n)=x(-n) is obtained by reflecting x(n) about n=0.
Operations on Signals

• Sample Summation

• Sample Product
Sampling
Questions
Find the Nyquist rate and Nyquist interval for the continuous time signal:
𝒙 𝒕 = 𝟓𝒄𝒐𝒔𝟐𝟎𝟎𝝅
Signal Preprocessing
Solution
𝑥 𝑡 = 𝐴1 𝑐𝑜𝑠𝑒𝜔1 𝑡
where A1 is the amplitude, ω1 𝑖𝑠 the angular frequency
𝜔1 200𝜋
𝑓1 = = = 100
2𝜋 2𝜋
The highest frequency component of continuous time signal F=100Hz and
minimum rate required to avoid aliasing
𝑁𝑦𝑞𝑢𝑖𝑠𝑡 𝑟𝑎𝑡𝑒 = 2 × 𝐹 = 2 × 100 = 200𝐻𝑧
Signal Preprocessing
Questions
Find the Nyquist rate and Nyquist interval for the continuous time signal:
𝟏
𝒙 𝒕 = 𝐜𝐨𝐬 𝟒𝟎𝟎𝟎𝝅𝒕 𝐜𝐨𝐬 𝟏𝟎𝟎𝟎𝝅𝒕
𝟐𝝅
Signal Preprocessing
Solution
1
𝑥 𝑡 = cos 4000𝜋𝑡 cos 1000𝜋𝑡
2𝜋
1
𝑥 𝑡 = [2cos 4000𝜋𝑡 cos 1000𝜋𝑡 ]
4𝜋
1
𝑥 𝑡 = [2os 4000𝜋𝑡 + 10004000𝜋𝑡 +cos 4000𝜋𝑡 − 1000𝜋𝑡 ]
4𝜋
1
𝑥 𝑡 = [cos 5000𝜋𝑡 cos 3000𝜋𝑡 ]
4𝜋
Now let us asume that there are two frequencies present in the signal
𝑥 𝑡 = 𝐴1 𝑐𝑜𝑠𝑒𝜔1 𝑡 + 𝐴2 𝑐𝑜𝑠𝑒𝜔2 𝑡
whereA1 andA2 are the amplitude, ω1 andω2 are the angular frequencies
Signal Preprocessing
Solution
𝜔1 = 5000𝜋 𝜔2 = 5000𝜋
𝜔1 5000𝜋
𝑓1 = = = 2500
2𝜋 2𝜋
𝜔2 3000𝜋
𝑓2 = = = 1500
2𝜋 2𝜋
Then, the highest frequency component of the given management signal will be
𝑓𝑚𝑎𝑥 = 𝑀𝑎𝑥 𝑓1 , 𝑓2 = 𝑀𝑎𝑥 2500,1500 = 2500𝐻𝑧
𝐻𝑒𝑛𝑐𝑒, 𝑁𝑦𝑞𝑢𝑖𝑠𝑡 𝑟𝑎𝑡𝑒 = 2 × 𝑓𝑚𝑎𝑥 = 2 × 2500 = 5000𝐻𝑧
1
𝑁𝑦𝑞𝑢𝑖𝑠𝑡 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙 =
𝑁𝑦𝑞𝑢𝑖𝑠𝑡 𝑟𝑎𝑡𝑒
1
= = 2 × 10−4 = 200 𝑚𝑖𝑙𝑖𝑠𝑒𝑐𝑜𝑛𝑑𝑠
500
Operations on Signals
Questions
Using basic building blocks, sketch the block diagram representation of
the discrete-time system described by input output relation:
y(n)=0.25y(n+1)+0.5x(n)+0.5x(n-1), where x(n) is the input and y(n) is the
output of the system.
Operations on Signals
Questions
Using basic building blocks, sketch the block diagram representation of
the discrete-time system described by input output relation:
y(n)=0.25y(n+1)+0.5x(n)+0.5x(n-1), where x(n) is the input and y(n) is the
output of the system.
Answer
Operations on Signals
Questions
Given discrete-time signal x[n]= [2 0 ณ𝟑 1 1 -1], where the arrow (brace)
indicates the zeroth sample (n=0). Sketch the following:
– x[n-2]
– x[n/2]
– x[n^2]
– x[-2+3]
– 3x[n-2]δ[n-4]
– x[n]u[2-n]
– 𝑥𝑒 [𝑛] −𝑥𝑜 [𝑛]
Operations on Signals
Questions
Given discrete-time signal x[n]= [2 0 ณ𝟑 1 1 -1], where the arrow (brace)
indicates the zeroth sample (n=0). Sketch the following:

• x[n-2]
Operations on Signals
Questions
Given discrete-time signal x[n]= [2 0 ณ𝟑 1 1 -1], where the arrow (brace)
indicates the zeroth sample (n=0). Sketch the following:

• x[n/2]
Operations on Signals
Questions
Given discrete-time signal x[n]= [2 0 ณ𝟑 1 1 -1], where the arrow (brace)
indicates the zeroth sample (n=0). Sketch the following:

• x[n^2]
Operations on Signals
Questions
Given discrete-time signal x[n]= [2 0 ณ𝟑 1 1 -1], where the arrow (brace)
indicates the zeroth sample (n=0). Sketch the following:

• x[-2n+3]
Operations on Signals
Questions
• x[-2n+3]
Operations on Signals
Questions
Given discrete-time signal x[n]= [2 0 ณ𝟑 1 1 -1], where the arrow (brace)
indicates the zeroth sample (n=0). Sketch the following:

• 3x[n-2]δ[n-4]
Operations on Signals
Questions
Given discrete-time signal x[n]= [2 0 ณ𝟑 1 1 -1], where the arrow (brace)
indicates the zeroth sample (n=0). Sketch the following:
• x[n]u[2-n]
Operations on Signals
Questions
Given discrete-time signal x[n]= [2 0 ณ𝟑 1 1 -1], where the arrow (brace)
indicates the zeroth sample (n=0). Sketch the following:
• 𝑥𝑒 [𝑛]
Operations on Signals
Questions
Given discrete-time signal x[n]= [2 0 ณ𝟑 1 1 -1], where the arrow (brace)
indicates the zeroth sample (n=0). Sketch the following:
• 𝑥𝑜 [𝑛]
Operations on Signals
Questions
Determine which of the following signals are periodic and if so, determine
their fundamental period.
a)
b)
c)
d)
e)
Operations on Signals
Questions
Determine which of the following signals are periodic and if so, determine
their fundamental period.
a)

𝑤 30
𝑓= 𝑤= 𝜋
2𝜋 105

Since the result in its simplest form is a rational number, the signal is
periodic with the fundamental period being the denominator of the rational
fraction N=7.
Operations on Signals
Questions
Determine which of the following signals are periodic and if so, determine
their fundamental period.
b)

𝑤
𝑓=
2𝜋

Since the result in its simplest form is not a rational number, the signal is
non-periodic.
Operations on Signals
Questions
Determine which of the following signals are periodic and if so, determine
their fundamental period.
c)

𝑤
𝑓=
2𝜋

The signal is periodic with the fundamental period N=20.


Operations on Signals
Questions
Determine which of the following signals are periodic and if so, determine
their fundamental period.
d)

This is the summation of two sinusoidal with different frequencies.


𝑤
𝑓=
2𝜋
The first sinusoid is periodic with a period of N=6, while the second one is
non-periodic. Therefore, the whole signal is non-periodic.
Operations on Signals
Questions
Determine which of the following signals are periodic and if so, determine
their fundamental period.
e)
Through the use of trigonometric identities, the signal can be expressed as the
summation of two sinusoids.

The first sinusoid has a period of N1=6, while the second has a period of
N2=9. Thus, the whole signal is periodic with the fundamental period being
the lowest common multiple (LCM) of the two periods N=18 .
Notes • Listing Multiples Method
– Write down the multiples of two
• Trigonometric identities numbers up to the first common
multiple.
• For example, find LCM of 5 and 9.
Multiples of number 5 = 5, 10,15, 20, 25,
30, 35, 40, 45 and so on. Multiples of
number 9 = 9, 18, 27, 36, 45 and so on.
The first smallest common multiple is 45,
of numbers 5 and 9. Hence the LCM of the
two numbers is 45.
• How to Find LCM of Two Numbers? • Prime Factorization Method
– LCM of two numbers can be – Write down all the prime factors of two
calculated by using many methods. numbers then multiply each factor with
Some of these the highest powers to calculate the LCM
• Listing Multiples Method of two numbers.
• Prime Factorization Method • For example, find LCM of 18 and 24.
• Division Method • Prime factors of number 18 = 2 × 3^2
• HCF method • Prime factors of number 24 = 2^3 × 3
• LCM of numbers 18 and 24 = 2^3 × 3^2 =
72
Basic System Properties
• A common way of viewing a system is in terms of a “black box” with
terminals.

• In the figure, x1(t), x2(t)… xp(t) are the signals applied to the p input
terminals of the system and y1 (t), y2 (t)… yq (t) are the resulting responses
appearing at the q output terminals of the system.
• In general, p is not equal to q; in other words, the number of input terminals
may not equal the number of output terminals. When p=q=1, the system is a
signal–input single–outputs system, sometimes referred to as a scalar
system.
Basic System Properties
• Causality
• Linearity
• Time invariance
• Memoryless system and system with memory
• Stability
Basic System Properties
• Causality
– Causal system: the output of system is independent of future values
of input. It is only dependent on the present input or the past input or
combination of both.
• e.g y(t)=x(t)+x(t-1)

– Non-causal system: the output of system depends on future values of


the input at any instant of time. It may depend on past or present values,
but it should also depend on the future.
• e.g y(t)=x(t+2)+x(t-1)
Basic System Properties
• Time In-variance
– A system is time invariant if any delay in the input produces a similar
delay in the output.
– A specific input will produce the same output independently of the time
applications.
Basic System Properties
• Memoryless system and system with memory
– A system has memory if the output at time t depends only on future or
past values of the input x (t).

– A causal system is memoryless if for any time t, the value of the output
at time t depends only on the value of the input at time t.
Basic System Properties
• Linearity
– A linear system is a system that follows the principle of superposition.
– The superposition is composite of two laws:
1. Law of additivity
The response to x1(t) + x2(t) is y1(t) + y2(t)
Basic System Properties
• Linearity
– A linear system is a system that follows the principle of superposition.
– The superposition is composite of two laws:
2. Law of homogenity
The response to ax1(t) is ay1(t)
Basic System Properties
• Stability
– BIBO – Bounded Input = Bounded Output
– For a stable system o/p should be bounded for bounded i/p at each and
every instant of time.
– If we suspect a system is unstable: check a specific bounded input that
leads to an unbounded output
Basic System Properties
Questions
Check the following systems with respect to: time in-variance, linearity,
causality, and BIBO stability. Also, determine if any of them is with
memory.
Basic System Properties
Questions
Check the following systems with respect to: time in-variance, linearity,
causality, and BIBO stability. Also, determine if any of them is with
memory.

With memory because, for example, y[0] depends on a past input sample x[-1].
Causal because the output at any time doesn’t depend on future input samples.
Non linear
Basic System Properties
Questions
Check the following systems with respect to: time in-variance, linearity,
causality, and BIBO stability. Also, determine if any of them is with
memory.

Time invariant
Basic System Properties
Questions
Check the following systems with respect to: time invariance, linearity,
causality, and BIBO stability. Also, determine if any of them is with
memory.

Memoryless because the output at any time doesn’t depend on past/future input
samples.
Causal because the output at any time doesn’t depend on future input samples.
Non linear
Basic System Properties
Questions
Check the following systems with respect to: time in-variance, linearity,
causality, and BIBO stability. Also, determine if any of them is with
memory.

Time invariant
Basic System Properties
Questions
Check the following systems with respect to: time invariance, linearity,
causality, and BIBO stability. Also, determine if any of them is with
memory.

Memoryless because the output at any time doesn’t depend on past/future input
samples.
Causal because the output at any time doesn’t depend on future input samples.
linear
Basic System Properties
Questions
Check the following systems with respect to: time in-variance, linearity,
causality, and BIBO stability. Also, determine if any of them is with
memory.

Time variant

You might also like