You are on page 1of 18

Acquiring Audio

Data
Topics
 What is audio?
 A/D Converter - Sampling

 Why digitization?
 Sampling Interval
 Storage Requirement
 Acquisition and Storage
 Compression
Audio Data
 Types : Speech, Music, Noise
 Common feature of sound: Variant with time
Basics of Sound
 Audio input is acquired using a microphone.
 Microphone converts sound waves into an electrical voltage.
 The electrical voltage varies with time and it is called as an audio waveform.
 A continuous waveform is called as an analog signal.
 To store this analog signal in memory, it should be converted into digital signal.
 The conversion from analog to digital signal is done by an analog to digital converter.
(A/D converter)
 The conversion is done by the process of sampling.
 Replacing a continuous amplitude value by an approximated digital equivalent is called
amplitude quantization.
Why Should Audio be Digitized?
 Digitized audio provides immunity from noise (not affected by small
disturbances).
 Digital processing is performed using numeric calculations which are not
constrained by physical properties of components.
 Digital processing is more powerful.
 Digital processing is cheaper
 Digital storage media is more durable.
Representing Sound

 Sound needs to be converted into binary for computers to be able to process it.
 To do this, sound is captured - usually by a microphone - and then converted into a digital
signal.
 An analogue to digital converter will sample a sound wave at regular time intervals.

For example, a sound


wave like this can be
sampled at each time
sample point:
• The samples can then be converted to binary. They will be recorded to the
nearest whole number.
Time
1 2 3 4 5 6 7 8 9 10
sample
Decimal 8 3 7 6 9 7 2 6 6 6
Binary 1000 0011 0111 0110 1001 0111 0010 0100 0110 0110
• The sampling interval should be chosen in such a way that it captures all
information with the minimum number of samples.
• If the sampling interval is very small, the size of the sampling table will
become very large.
• If it is very large, the sound wave may be distorted and information will be
lost.
Calculation of Sampling Interval
 A pure tone is an analog signal which is a sine wave.
 fL - Lowest
 Nyquist’s Sampling Theorem
 If fhigh is the highest frequency present in the signal, then sampling interval should be slightly
less than 1/(2*fhigh)
 Ex. fL=30 Hz; fH=3000 Hz
 Sampling Interval ~ 1/(2*fH) = 1/(2*3000) = 1/6000 ~ 1/6250 = 0.00016 sec
= 0.00016 * 1000 = 0.16 milliseconds
 Number of samples per second = 1/sampling interval = 1/(0.16 * 10-3) = 6250
samples/sec
 Sampling interval for music may be much higher than that for speech
Storage needed for Digitized Audio Signals
 Number of bits required to represent amplitudes (for speech) = 8 bits
 Number of levels that can be represented = 28 = 256 levels
 Number of bits required to represent music = 16 bits
 Number of levels that can be represented = 216 > 64,000
 If a telephone message of up to 1 minute is to be stored, how many bytes of
memory are required?
 Solution
 Number of samples per second = 6250
 Number of samples per minute – 6250 x 60 = 375000
 Number of bits/sample = 8 bits = 1 byte
 Memory required to store 1 minute message = 375000 x 1 bytes
= 375000 bytes
= 375000/1024 = 367 KB
 How many samples per second must be taken for audio signals suitable for a high
fidelity audio system?
 Solution
 For a high fidelity audio system,
 fL = 20 Hz
 fH = 22 kHz = 22000 Hz
 Sampling interval ~ 1/(2*22000) = 1/44000.
 Samples per second = 44100
 High fidelity stereo music is to be represented in digital form. How many bytes are
needed to store 1 minute of music?
 Solution:
 Number of samples/second = 44100
 Bytes/sample per channel = 2
 In stereo systems, there are two independent audio signals.
 Therefore, number of samples needed to store 1 minute of music = 2 x 44100 x 2 x 60
= 10584000 bytes = 10584000/(1024 x 1024) = 10.1 MB
Acquisition and Storage of Audio Signals
 Sound waves are converted into electrical signals by a microphone.
 If the audio signal is stored in a playback media, the audio output is fed to an A/D
converter.
 The digital output of A/D converter is stored in memory.
 The A/D converter is built into an electronic circuit called sound card.
 Sound card can be added as an add-on card to the computer.
 The digital file has the extension (.wav)
 It is called a wave file.
 The storage required depends on the type of input audio signal and the duration for
which the values are stored.
 In a multimedia PC, good quality loud speakers are also connected.
 The digitized audio signal can be played back using the sound card.
 The card has an Digital to Analog converter (D/A converter) which reads the wave
file and converts it into an analog signal, amplifies it and feeds it into the loud
speakers.
Compression of Audio Signals
 Compressed format : MP3
 Moving Pictures Experts Group – Layer 3 audio compression standard.
 Algorithm basic: When two sounds are played together the louder sound is heard
rather than the softer sound.
 MP3 audio players consists of a processor which decompresses the compressed
file to original file, converts it to analog and plays it back using speakers.

Load Music Amplifier


MP3 files Store Processor D/A and
from PC MP3 Files Speaker
High Speed
Memory Decompression Conversion to
Plays music
(Random Program Analog Signal
Access
Advantages of MP3 Player
 All the components used by MP3 player are integrated circuits. There are no
moving parts. So it will withstand jerks unlike a portable CD player.
 Low power requirement.
 Compact and light weight.
 High memory size
 Low cost
Part A & B Questions
 Which is the input device used to acquire audio data?
 ----------------- converts sound waves into electrical voltage.
 The conversion from analog to digital signal is done by ------------------.
 The conversion from digital data to analog signal is done by ------------.
 What is sampling?
 What is amplitude quantization?
 List the characteristics of digital audio.
 State Nyquist’s sampling theorem.
 What is the extension of digital audio file?
 How do you compress sound?
 State the advantages of MP3 player
Essay Questions
 How do you acquire and store audio signals in a computer?
 Explain the process of sampling audio signals.

You might also like