Cite this asDraganov IR, Pleshkova SG (2020) Comparative analysis of speech coders. Trends Comput Sci Inf Technol 5(1): 001-004. DOI: 10.17352/tcsit.000010
In this paper a comparative analysis of some of the most popular speech coders is presented. Qualitatively and quantitatively are tested Linear Prediction Coding in its implementation LPC-10e and with the use of auto-correlation and covariance, companding coding including A-law and µ-Law, ADPCM IMA, G.726 A- and µ-Law, and a fully featured MELP coder. All of them proved their efficiency for the typical applications they have been assign to providing the necessary quality vs. output data rate. The methodology for evaluation along with the codecs’ descriptions are considered useful for new coming specialists in the field of audio compression as one possible starting point for them.
In this paper is presented a comparative analysis of four speech codecs – Linear Predictive Coding (LPC), Companding (A-law and μ-law), Adaptive Pulse Code Modulation (ADPC), and Mixed Excitation Linear Prediction (MELP). Representing some of the basic steps of speech processing with the ultimate goal of achieving as higher as possible compression ratio, while retaining tolerable good quality of the voice, they are highly popular in modern telecommunications. Thus, a great interest is posed to them during the university studies of students into the courses on Audio Technologies. In , according to Chu, are classified some of the main properties defining the audio quality as a subjective estimate for recorded speech – intelligibility, naturalness (pleasantness), and speaker recognisability. They depend on several of factors such as dependency on speaker, language, signal levels, background noise, tandem coding, channel errors, presence of non-speech signals which need to be considered altogether. The main goal of this evaluation is to present, mainly to newly arising specialists, a systematic approach for estimation of key parameters that demonstrate the qualities of the considered algorithms along with their basic description.
Part II of this publication consists of general depiction of each of the tested codecs, followed by a comparative test results in Part III which are then discussed in Part IV and a brief conclusion is given in Part V.
The general concept of the Linear Predictive Coding (LPC)  is presented in Figure 1. It is a basic way for representing a speech signal in shorter form. It is embedded as a key processing step in many more complex contemporary speech codecs. Typically, speech is taken from the input in short segments. One of the underlying characteristics for them is the shape of the spectrum. Having a small number of parameters which describe it could be used for compacting. Since, a single speech sample is considered correlated to previous ones in time, it can be derived nearly by combining them linearly.
The output samples sp(n) of the speech are obtained from the sum of previous samples s which are weighted:
which inevitably leads to an error e(n):
All a(i) could be estimated by finding the minimum of the cumulative squared error E for the whole segment:
Actually, the speech samples s(n)are generated under the influence of excitation signal u(n) with the following relation:
In this process a LPC filter is applied with the following transfer function:
being fed by a noise (white) source and a voiced source with a pitch period T.
Talking about the Public Switched Telephone Network (PSTN) the well adapted and most often used speech codecs are the A-law and μ-law. The amplitudes of the input voice samples are being transferred by using a logarithm type function, actually achieving nonlinear quantization. The reason for employing a nonlinear transformation instead of a linear one is the nature of speech levels distribution. Most often the mid-range amplitudes are met in contrast to small and very large ones which the human ear perceives better. Companding (compressing and expanding) the user’s signal comes to as a natural solution – levels not affecting human speech perception are suppressed and the rest – kept as close to the original as possible. Then uniform quantization is applied. At reception point dequantization is implemented followed by expansion. United States and Japan use μ-law in their systems while A-law is employed in the other countries around the world and both come into the G.711 standard of ITU .
Transformation of the input signal s after initial normalization within the range of [-1, +1] following μ-law in 8-bit values is done according to:
where μ is positive integer (companding factor). The recommended value for it is 255.
The 8-bit A-law variation is represented by:
where A is recommended to be 87.6.
ADPCM is a sequel of the differential pulse code modulation. At it there is preserving only of the differences between samples while the size of the quantization step is changing for achieving higher compression ratios at given signal-to-noise ratio (SNR). Differences for adjacent samples tend to be very small frequently due to the considerable correlation of a voice signal in a small time period and they could be represented with less number of bits. Here a prediction is also applied of the speech signal and then the difference is calculated with it. Lower errors indicate more accurate prediction and in the general case it leads to lower dynamic range for he transmitted signal. Quantization, then, can be done with a fewer bits instead of using the original scale for input samples. The main processing steps of the algorithm are shown in Figure 2.
PCM values between the input sample x(n) and the predicted one derived from the previous xP(n-1) are calculated. While decoding, the quantized difference signal is put together with the predicted to regenerate the speech signal. Adaptive prediction and quantization improve the overall performance of the codec considering the variation in the speech signal. The quantizer is changing the step size conforming to the wave shape under processing. There are different implementations of the ADPCM algorithm. One of the most popular is described in G.726  recommended by the Interactive Multimedia Association (IMA) and the International Telecommunication Union (ITU). Here, linear PCM samples are placed into 4-bit values after the quantization starting from 16-bit per sample out from 8 kHz single channel. Initially, 128 kbps capacity per link is required which after compression falls down to 32 kbps. Operation is foreseen, also, at 40, 32, 24 and 16 kbps due to the adaptive speed control. The hard switching between voiced and unvoiced segments, pledged in LPC based voice coders, is considerable disadvantage producing errors when fricatives are processed. It can be solved by the introduction of second decision module about the current voice segment using multiple frequency bands. Mixed Excitation Linear Prediction (MELP) is such a solution. Short-term spectrum is analysed by LPC analysis eliminating the binary decision for voiced vs. unvoiced presence characterizing the full segments. Excitation is modelled by estimation of periodic and noise-like components rendering an account of their weight on forming the voice strength over different bands in spectrum domain. Four new features are introduced, apart from the LPC parameters – mixed pulse, noise excitation, aperiodic pulses, pulse dispersion and adaptive spectral enhancement.
Periodic and aperiodic pulses are included during the speech synthesis when the current frame consists of voice samples in the case of MELP. Aperiodic ones help in reducing distortions from the LPC module signal generation which happens for isolated sounds. They are typical for transitional regions where voice is followed by non-voice segments and vice versa. Figure 3 depicts the structure of the MELP codec.
Differences between untouched and synthesised voice where no formant is present are diminished by the pulse dispersion filter assuring slower collapse between pitch peaks. Excitation energy is more evenly distributed considering the period of the latter for better quality.
Post-filtering is also provided for adaptive spectral enhancement. LPC residual part could be represented by Fourier coefficients leading to complemented presentation of the excitation signal. Thus, the spectral shape is included for processing helping for better reproduction of lower frequencies in contrast to the LPC.
The input non-compressed audio of a female speech is contained in wav-format file representing mono signal with a sample rate of 8 kHz and 16 bits/sample. Its length is 20 sec. For the evaluation of the codecs described in Section II the following quantitative parameters are used :
Signal-to-Noise Ratio (SNR):
where s and are the original and restored speech signals, respectively; N – the total number of samples processed;
Log Spectral Distance (LSD):
where L is the number of processed segments; K – their length in number of samples; t and are the spectral powers of a segment prior to and after processing. The Perceptual Evaluation of Speech Quality Mean Opinion Score (PESQMOS) is found according to the ITU-T recommendation P.862  (Table 1).
The audible evaluation of the resulting samples shows that there is a little hissing around the consonants in for the LPC-10e coder. Some mid consonants in between vocals seem shortened which gives a bit computerized sounding when autocorrelation method is switched on in LPC. There is detectable nasal hue at the end of vocals preceding pauses which also give prolonged sounding. The companding approach using both A-law and µ-Law assures very clear distinction between vocals and consonants with just a little bit hiss addition in steepest transitions for µ-Law. ADPCM codec variants are very close in results of subject appraisal to companding with hardly discoverable for the A-law a little noised prolongation at the end of some words where vocals reside. Emphasized consonants appear in the speech processed by MELP in all parts with lower level of persistent noise (as background presence) and with no buzziness effects.
The quantitative and qualitative evaluation of the LPC, Companding, ADPCM, and MELP speech coders are with mutual agreement proving them as applicable within systems providing voice services of mass type. There could be noted some significant improvement of the quality based on both SNR and PESQMOS measures for the group of Companding and ADPCM algorithms regardless of the type of transformation inside, whether it is A-law or µ-Law. All quality variations are compensated by the achieved data rates proper for the respective applications.
Subscribe to our articles alerts and stay tuned.