1 5 Analog To Digital Voice Encoding
1 5 Analog To Digital Voice Encoding
1 5 Analog To Digital Voice Encoding
IP Telephony v1.0
Cisco Public
57
Digitizing speech was a project first undertaken by the Bell System in the 1950s. The original purpose of digitizing speech was to deploy more voice circuits with a smaller number of wires. This evolved into the T1 and E1 transmission methods of today.
1-62
To convert an analog signal to a digital signal, you must perform these steps: Analog-to-Digital Signal Conversion
Step 1. Procedure Sample the analog signal regularly. Description The sampling rate must be twice the highest frequency to produce playback that appears neither choppy nor too smooth. Quantization consists of a scale made up of eight major divisions or chords. Each chord is subdivided into 16 equally spaced steps. The chords are not equally spaced but are actually finest near the origin. Steps are equal within the chords but different when they are compared between the chords. Finer graduations at the origin result in less distortion for low-level tones. PBX output is a continuous analog voice waveform. T1 digital voice is a snapshot of the wave encoded in ones and zeros. Although not essential to convert analog signals to digital, signal compression is widely used to reduce bandwidth.
2.
3.
Encode the value into 8-bit digital form. (Optional) Compress the samples to reduce bandwidth.
4.
The three components in the analog-to-digital conversion process are further described as follows:
Sampling: Sample the analog signal at periodic intervals. The output of sampling is a pulse amplitude modulation (PAM) signal. Quantization: Match the PAM signal to a segmented scale. This scale measures the amplitude (height) of the PAM signal and assigns an integer number to define that amplitude. Encoding: Convert the integer base-10 number to a binary number. The output of encoding is a binary expression in which each bit is either a 1 (pulse) or a 0 (no pulse).
This three-step process is repeated 8000 times per second for telephone voice-channel service. Use the fourth optional stepcompressionto save bandwidth. This optional step allows a single channel to carry more voice calls.
Note The most commonly used method of converting analog to digital is pulse code modulation (PCM).
1-63
IP Telephony v1.0
Cisco Public
58
After the receiving terminal at the far end receives the digital PCM signal, it must convert the PCM signal back into an analog signal. The process of converting digital signals back into analog signals includes the following two steps:
Decoding: The received 8-bit word is decoded to recover the number that defines the amplitude of that sample. This information is used to rebuild a PAM signal of the original amplitude. This process is simply the reverse of the analog-to-digital conversion. Filtering: The PAM signal is passed through a properly designed filter that reconstructs the original analog wave form from its digitally coded counterpart.
1-64
Nyquist Theorem
IP Telephony v1.0
Cisco Public
59
Digital signal technology is based on the premise stated in the Nyquist Theorem: when a signal is instantaneously sampled at the transmitter in regular intervals and has a rate of at least twice the highest channel frequency, then the samples will contain sufficient information to allow an accurate reconstruction of the signal at the receiver.
1-65
Source algorithms
LDCELP CS-ACELP
IP Telephony v1.0
Cisco Public
60
Waveform algorithms (coders): Waveform algorithms have the following functions and characteristics: Sample analog signals at 8000 times per second Use predictive differential methods to reduce bandwidth Highly impact voice quality because of reduced bandwith Do not take advantage of speech characteristics
Source algorithms (coders): Source algorithms have the following functions and characteristics: Source algorithm coders are called vocoders, or voice coders. A vocoder is a device that converts analog speech into digital speech, using a specific compression scheme that is optimized for coding human speech. Vocoders take advantage of speech characteristics. Bandwidth reduction occurs by sending linear-filter settings. Codebooks store specific predictive waveshapes of human speech. They match the speech, encode the phrases, decode the waveshapes at the receiver by looking up the coded phrase, and match it to the stored waveshape in the receiver codebook.
1-66
ADPCM
Waveform coding scheme Adaptive: automatic companding Differential: encode changes between samples only
ITU standards:
G.711 rate: 64 kbps = (2 * 4 kHz) * 8 bits/sample G.726 rate: 32 kbps = (2 * 4 kHz) * 4 bits/sample G.726 rate: 24 kbps = (2 * 4 kHz) * 3 bits/sample G.726 rate: 16 kbps = (2 * 4 kHz) * 2 bits/sample
IP Telephony v1.0 2005 Cisco Systems, Inc. All rights reserved.
Cisco Public
61
Standard PCM is known as ITU standard G.711. Adaptive differential pulse code modulation (ADPCM) coders, like other waveform coders, encode analog voice signals into digital signals to adaptively predict future encodings by looking at the immediate past. The adaptive feature of ADPCM reduces the number of bits per second that the PCM method requires to encode voice signals. ADPCM does this by taking 8000 samples per second of the analog voice signal and turning them into a linear PCM sample. ADPCM then calculates the predicted value of the next sample, based on the immediate past sample, and encodes the difference. The ADPCM process generates 4-bit words, thereby generating 16 specific bit patterns. The ADPCM algorithm from the Consultative Committee for International Telegraph and Telephone (CCITT) transmits all 16 possible bit patterns. The ADPCM algorithm from the American National Standards Institute (ANSI) uses 15 of the 16 possible bit patterns. The ANSI ADPCM algorithm does not generate a 0000 pattern. The ITU standards for compression are as follows:
G.711 rate: 64 kbps = (2 * 4 kHz) * 8 bits/sample G.726 rate: 32 kbps = (2 * 4 kHz) * 4 bits/sample G.726 rate: 24 kbps = (2 * 4 kHz) * 3 bits/sample G.726 rate: 16 kbps = (2 * 4 kHz) * 2 bits/sample
CCITT is now called International Telecommunication Union Telecommunication Standardization Sector (ITU-T).
Note
1-67
G.729, G.729 Annex A (G.729A), G.729 Annex B (G.729B), and G.729A Annex B (G.729AB) are variations of CS-ACELP. There is little difference between the ITU recommendations for G.729 and G.729A. All of the platforms that support G.729 also support G.729A. G.729 is the compression algorithm that Cisco uses for high-quality 8-kbps voice. When properly implemented, G.729 sounds as good as the 32-kbps ADPCM. G.729 is a highcomplexity, processor-intensive compression algorithm that monopolizes processing resources. Although G.729A is also an 8-kbps compression, it is not as processor-intensive as G.729. It is a medium-complexity variant of G.729 with slightly lower voice quality. G.729A is not as high-quality as G.729 and is more susceptible to network irregularities, such as delay, variation, and tandeming. Tandeming causes distortion that occurs when speech is coded, decoded, and then coded and decoded again, much like the distortion that occurs when a videotape is repeatedly copied.
G.729 and G.729A G.729 and G.729 G.729A and G.729A G.729B and G.729AB G.729B and G.729B G.729AB and G.729AB
1-68
IP Telephony v1.0
Cisco Public
62
The following three common voice compression techniques are standardized by the ITU-T:
PCM: Amplitude of voice signal is sampled and quantized at 8000 times per second. Each sample is then represented by one octet (8 bits) and transmitted. For sampling, you must use either a-law or -law to reduce the signal-to-noise ratio. ADPCM: The difference between the current sample and its predicted value (based on past samples). ADPCM is represented by 2, 3, 4, or 5 bits. This method reduces the bandwidth requirement at the expense of signal quality. CELP: Excitation value and a set of linear-predictive filters (settings) are transmitted. The filter setting transmissions are less frequent than excitation values and are sent on an asneeded basis.
The table describes the codecs and compression standards: Codecs and Compression Standards
Codec G.711 G.726 G.728 G.729 G.729A Compression Technique PCM ADPCM LDCELP CS-ACELP CS-ACELP Bit Rate (kbps) 64 16, 24, 32 16 8 8
1-69
IP Telephony v1.0
Cisco Public
63
The figure depicts mean opinion score (MOS). MOS is a system of grading the voice quality of telephone connections. The MOS is a statistical measurement of voice quality derived from the judgments of several subscribers. Graded by humans and very subjective, the range of MOS is 1 to 5, where 5 is direct conversation. Voice Quality of Telephone Connections
Rating 5 4 3 2 1 Speech Quality Excellent Good Fair Poor Unsatisfactory Level of Distortion Imperceptible Just perceptible but not annoying Perceptible and slightly annoying Annoying but not objectionable Very annoying and objectionable
1-70
IP Telephony v1.0
Cisco Public
64
A newer, more objective measurement is available that is quickly overtaking MOS scores as the industry quality measurement of choice for coding algorithms. Perceptual Speech Quality Measurement (PSQM), as per ITU standard P.861, provides a rating on a scale of 0 to 6.5, where 0 is best and 6.5 is worst. PSQM is implemented in test equipment and monitoring systems that are available from vendors other than Cisco. Some PSQM test equipment converts the 0-to-6.5 scale to a 0-to-5 scale to correlate to MOS. PSQM works by comparing the transmitted speech to the original input and yields a score. Various vendor test equipment is now capable of providing a PSQM score for a test voice call over a particular packet network. In 1998, British Telecom developed a predictive voice quality measurement algorithm called Perceptual Analysis Measurement System (PAMS). PAMS can predict subjective speech quality measurement methods, such as MOS, when fidelity is affected by such things as waveform codecs, vocoders, and various speaker dependencies, such as language. PAMS, unlike PSQM, includes automatic normalization for levels. ITU standard P.862 supercedes P.861 and describes a voice quality measurement technique that combines PSQM and PAMS. Originally developed by KPN Research, the Netherlands, and British Telecommunications (BT), Perceptual Evaluation of Speech Quality (PESQ) is an objective measuring tool that can predict results of subjective measuring tests, such as MOS. PESQ can be found in test equipment from a variety of vendors.
1-71