Next Article in Journal
The Vulnerability of the Production Line Using Industrial IoT Systems under DDoS Attack
Previous Article in Journal
The Influence of Public Transport Delays on Mobility on Demand Services
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Efficient Codebook Search Algorithm for Line Spectrum Frequency (LSF) Vector Quantization in Speech Codec

1
Smart Sensing R&D Center, Institute of Microelectronics of Chinese Academy of Sciences, Beijing 100029, China
2
Department of Microelectronics, University of Chinese Academy of Sciences, Beijing 100049, China
*
Author to whom correspondence should be addressed.
Electronics 2021, 10(4), 380; https://doi.org/10.3390/electronics10040380
Submission received: 3 December 2020 / Revised: 21 January 2021 / Accepted: 2 February 2021 / Published: 4 February 2021
(This article belongs to the Section Circuit and Signal Processing)

Abstract

:
A high-performance vector quantization (VQ) codebook search algorithm is proposed in this paper. VQ is an important data compression technique that has been widely applied to speech, image, and video compression. However, the process of the codebook search demands a high computational load. To solve this issue, a novel algorithm that consists of training and encoding procedures is proposed. In the training procedure, a training speech dataset was used to build the squared-error distortion look-up table for each subspace. In the encoding procedure, firstly, an input vector was quickly assigned to a search subspace. Secondly, the candidate code word group was obtained by employing the triangular inequality elimination (TIE) equation. Finally, a partial distortion elimination technique was employed to reduce the number of multiplications. The proposed method reduced the number of searches and computation load significantly, especially when the input vectors were uncorrelated. The experimental results show that the proposed algorithm provides a computational saving (CS) of up to 85% in the full search algorithm, up to 76% in the TIE algorithm, and up to 63% in the iterative TIE algorithm. Further, the proposed method provides CS and load reduction of up to 29–33% and 67–69%, respectively, over the BSS-ITIE algorithm.

1. Introduction

Vector quantization (VQ) is a high-performance technique for data compression. Due to its simple coding and high compression ratio, it has been successfully applied to speech, image, audio, and video compression [1,2,3,4,5,6]. It is also a key part of the G.729 Recommendation. A major handicap is that a remarkable computational load is required for the VQ of line spectrum frequency (LSF) coefficients of the speech codec [7,8,9,10,11,12]. Thus, it is necessary to reduce the computation load of VQ.
Conventionally, a full search algorithm is employed to find the code word that is best matched with an arbitrary input vector. However, the full search algorithm demands a large computation load. To reduce the encoding search complexity, many approaches have been proposed [13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]. These approaches can be classified into four main types, according to their base techniques. The first type is the tree-structured VQ (TSVQ) technique [13,14,15,16,17], the second type is the triangular inequality elimination (TIE)-based approach [18,19,20,21], the third type is the equal-average equal-variance equal-norm nearest neighbor search (EEENNS) method [22,23,24] based on the statistical characteristic values of the input signal, and the last type is the binary search space-structured VQ (BSS-VQ) [25,26,27,28] method.
In the TSVQ approaches [13,14,15,16,17], the search complexity can be reduced significantly. However, the reconstructed speech quality is poor because the selected code word is not necessarily the best matched to the input vector. In contrast, the TIE-based method [18,19,20,21] can achieve an enormous computational load reduction without loss of speech quality. By employing the high correlation between the adjacent frames, a TIE method is used to reject the impossible candidate code words. However, the performance of computational load reduction is weakened when the input vectors are uncorrelated. The EEENNS technique employs the statistical characteristics of an input vector, such as the mean, the variance, and the norm, to reject the impossible code words. In order to further reduce the computational load, the BSS-VQ method [25] is proposed, in which the number of candidate code words is closely related to the distribution of the hit probability, and a sharpened distribution at specific code words yields an enormous computational load. However, the probability distribution is not uniform; some subspaces are concentrated, and some are flattened. Thus sometimes the performance is not good.
To solve the above issues, an efficient VQ codebook search algorithm is proposed. Even though the input vectors are uncorrelated, it can still reduce the computational load significantly while maintaining the quantization accuracy. Compared with previous works on the full search algorithm [6], TIE [18], ITIE [21], and the BSS-ITIE [28], the experimental results show that the proposed algorithm can quantize the input vector with the lowest computational load.
The rest of this paper is organized as follows. Section 2 describes the encoding procedure of the LSF coefficients in G.729. Section 3 presents the theory of the proposed algorithm in detail. Section 4 shows the experimental results and performance comparison between the proposed algorithm and previous works. Finally, Section 5 concludes this work.

2. LSF Coefficients Quantization in G.729

The ITU-T G.729 [29] speech codec was selected as the platform to verify the performance of the proposed algorithm. Thus, before introducing the theory of the proposed method, the principle of the LSF quantization in G.729 is introduced here.
The LSF coefficients are obtained by an equation ω i = a r cos ( q i ) , where q i is the LSF coefficient in the cosine domain, and w i is the computed LSF coefficient in the frequency domain.
The procedure of the LSF quantize is organized as follows: a switched 4th moving average (MA) prediction is used to predict the LSF coefficients of the current frame. The difference between the computed and predicted coefficients is quantized using a two-stage vector quantizer. The first stage is a 10-dimensional VQ using a codebook L 1 with 128 entries (7 bits). In the second stage, the quantization error vectors of the first stage are split into two sub-vectors, which then are quantized by a split VQ associating two codebooks, L 2 and L 3 , each containing 32 entries (5 bits). Figure 1 illustrates the structure of the two-stage VQ for LSF coefficients.
To explain the quantization process, it is convenient to describe the decoding process first. Each quantized value is obtained from the sum of the two code words, as follows:
l ^ i = { L 1 i ( l 1 ) + L 2 i ( l 2 )    i = 1 , , 5 L 1 i ( l 1 ) + L 3 i 5 ( l 3 ) i = 6 , , 10 ,
where l 1 , l 2 , and l 3 are the codebook indices. To guarantee that the reconstructed filters are stable, the vector l ^ i is arranged such that adjacent elements have a minimum distance of d min . This rearrangement process is done twice. First, the quantized LSF coefficients, ω ^ i ( m ) , for the current frame, m, are obtained from the weighted sum of previous quantizer outputs, l ^ i ( m k ) , and the current quantizer output, l ^ i m .
ω ^ i ( m ) = ( 1 k = 1 4 P ^ i , k ) l ^ i m + k = 1 4 P ^ i , k l ^ i ( m k ) i = 1 , , 10 .
where p ^ i , k are the coefficients of the switched MA predictor as defined by parameter, p 0 . For each of the two MA predictors the best approximation to the current LSF coefficients has to be found. The best approximation is defined as the one that minimizes the weighted mean-squared error (MSE).
E l s f = i = 1 10 W i ( ω i ω ^ i ) 2 .
The weights emphasize the relative importance of each LSF coefficient. The weights, W i , are made adaptive as a function of the unquantized LSF parameters.
W 1 = { 1.0            , i f   ω 2 0.04 π 1 > 0 10 ( w 2 0.04 π 1 ) 2 + 1   ,   otherwise .
W i ,   f o r   2 i 9 = { 1.0             , i f   ω i + 1 ω i 1 1 > 0 10 ( ω i + 1 ω i 1 1 ) 2 + 1   ,   otherwise .
W 10 = { 1.0            , i f   ω 9 + 0.92 π 1 > 0 10 ( ω 9 + 0.92 π 1 ) 2 + 1   ,   o t h e r w i s e .
Then, the weights ω 5 and ω 6 are multiplied by 1.2 each. The vector to be quantized for the current frame, m , is obtained from Equation (7).
I i ( m ) = [ ω i ( m ) k = 1 4 p ^ i , k I ^ i ( m k ) ] / ( 1 k = 1 4 p ^ i , k ) , i = 1 , , 10 .
The first codebook, L 1 , is searched and the entry, l 1 , that minimizes the unweighted MSE is selected. Then the second codebook, L 2 , is searched by computing the weighted MSE, and the entry l 2 , which results from the lowest error is selected. After selecting the first stage vector, l 1 , and the lower part of the second stage, l 2 , the higher part of the second stage is searched from the codebook, L 3 . The vector, l 3 , that minimizes the weighted MSE is selected. The resulting vector, I ^ i , i = 1 , , 10 , is rearranged twice using the above procedure. The procedure is done for each of the two MA predictors defined by p0, and the MA predictor that produces the lowest weighted MSE is selected. Table 1 shows the two groups of coefficients of the MA predictor. When the first group of coefficients is selected, the value of p0 is 0. Otherwise, the value of p0 is 1. Table 2 shows the bit allocation of the LSF quantizer.

3. Proposed Search Algorithm

In this paper, a fast codebook search algorithm of vector quantization is proposed to reduce the computation load of the LSF coefficients’ quantization in the G.729 speech codec. Even though the input vectors are uncorrelated, this can still reduce the computation load significantly, while maintaining the quantization accuracy.
In the BSS-VQ method [25], the number of candidate code words is strongly related to the distribution of the hit probability for each subspace, and a sharpened distribution at specific code words yields an enormous computational load while maintaining the quantization accuracy. However, the probability distribution is not uniform: some subspaces are concentrated, and some are flattened. Thus, sometimes its performance is poor. The TIE algorithm [18] uses the strong correlation between adjacent values to narrow the search range. However, its performance is poor when the inputs are uncorrelated.
Considering the drawbacks of the above methods, to further reduce computational load, especially when the inputs are uncorrelated, a novel algorithm is proposed. After the statistical analysis, the code word corresponding to the highest hit probability for each subspace is obtained and selected as the reference code word, and a squared-error distortion look-up table for each subspace is built. The adjacent code word is highly correlated due to the squared-error distortion changing slightly in the squared-error look-up table. The reference code word corresponding to the highest probability is regarded as the best-matched code word. Thus, the smaller the squared-error distortion with the reference code word, the more likely the candidate code word is to be the best matched. Therefore, the TIE technique can be employed to reject the impossible code words. The proposed algorithm consists of the training procedure and encoding procedure. The structure of the proposed algorithm is illustrated in Figure 2, and the theory of the proposed algorithm is presented in detail as follows.

3.1. Training Procedure

In the three-stage training procedure, the squared-error look-up table for each subspace is prebuilt. At stage 1, each dimension is dichotomized into two subspaces. Then, an input vector is assigned to a corresponding subspace according to the entries of the input vector [25]. For instance, when the input is a 10-dimensional vector, there are 2 10 = 1024 subspaces in G.729. Before the encoding procedure, a look-up table that contains the hit probability statistical information on the code words is prebuilt.
The dichotomy position for each dimension is defined as the mean of all the code words from the codebook, presented as:
m e a n ( k ) = 1 C S i z e i = 1 C S i z e c i ( k ) , 0 k < D i m ,
where c i ( k ) is the k -th component of the i -th code word c i , and m e a n ( k ) is the average value of all the i -th components. For instance, in the first stage of the LSF coefficients quantization in G.729, C S i z e = 128 , D i m = 10 in the codebook L 1 . A parameter v n ( k ) is defined for vector quantization on the n -th input vector x n , symbolized as:
v n ( k ) = { 2 k , x n ( k ) m e a n ( k ) 0 , x n ( k ) < m e a n ( k ) , 0 k < D i m ,
where x n ( k ) is the k -th component of x n . Then, x n is assigned to a subspace j ( b s s j ) , where j is the sum of v n ( k ) over all the dimensions, presented as:
x n b s s j | j = k = 0 D i m 1 v n ( k ) .
For instance, given an input x n = { 0.44 , 0.08 , 0.51 , 0.87 , 1.26 , 1.40 , 2.10 , 2.18 , 2.30 , 2.42 } , v n ( k ) = { 1 , 0 , 0 , 8 , 16 , 0 , 64 , 128 , 0 , 0 } for each k , j = 217 is obtained by (8) and (9), respectively. Then, the input vector x n is assigned to the subspace b s s j with j = 217 . This means that an input vector can be assigned to a corresponding subspace quickly, with only a few basic operations.
At stage 2, the hit probability table for each subspace is prebuilt through a training mechanism, which includes the probability for each code word to be the best-matched code word in each subspace. This is defined as follows: P h i t ( c i | b s s j ) , where 1 i C S i z e , 1 j S n u m , and S n u m = 2 D i m is the number of subspaces. Subsequently, the table is sorted in descending order by the hit probability value. For example, when i = 1 , P h i t ( i | b s s j ) | i = 1 = max c i { P h i t ( c i ) | b s s j } represents the highest hit probability in b s s j and the corresponding code word. The sum of all the hit probabilities for each subspace is 1.0. The hit probability P h i t ( c i | b s s j ) is computed by Equation (11), and the cumulative probability of the top N code words is symbolized as Equation (12):
P h i t ( c i | b s s j ) = t h e   n u m b e r   o f   t i m e s   t h a t   c o d e w o r d   c i   f a l l s   i n   t h e   s u b s p a c e   b s s j t h e   t o t a l   n u m b e r   o f   t i m e s   t h a t   a l l   t h e   c a n d i d a t e   c o d e w o r d s   f a l l s   i n   s u b s p a c e   b s s j ,
P c m u ( N | b s s j ) = i = 1 N P h i t ( n | b s s j ) , 1 N C S i z e ,
which represents the number of possible candidate code words. Further, to control the quantization accuracy and computational load, a variable named threshold of quantization accuracy (TQA) is defined. This is given a quantity, N j ( T Q A ) , which means the minimum number N that satisfies the equation P c m u ( N | b s s j ) T Q A in a subspace, b s s j , is expressed as:
N j ( T Q A ) = arg min N { N : P c u m ( N | b s s j ) T Q A } , 1 N C S i z e , 0 j S n u m ,
At stage 3, the highest hit probability code word in each subspace is selected as the reference code word c r , then the squared-error distortion among the reference code word and all the other code words, c i , in the codebook is calculated by (14).
d ( c r , c i ) = c r c i = i = 1 k 1 ( c r c i ) 2
Subsequently, the squared-error distortion look-up table for each subspace is built and then is sorted in ascending order. Algorithm 1 shows the pseudo-code of the training procedure.
Algorithm 1. Training procedure of the proposed algorithm
Step 1. Give a training speech dataset and a value, TQA.
Step 2. The input vector is assigned to a corresponding subspace, b s s j , by (9) and (10).
Step 3. Repeat Step 2 until all the input vectors are encoded.
Step 4. The hit probability table is obtained by (11) and (12) and then sorted in descending order.
Step 5. Select the highest hit probability code word as the reference code word, the squared-error distortion among the reference code word and other code words, c i , in the codebook is calculated by (14).
Step 6. The squared-error distortion look-up table is prebuilt for each subspace and is sorted in ascending order.

3.2. Encoding Procedure

Given a testing speech set and a value for T Q A , in step 1, an input vector is assigned to a search subspace by (9) and (10). In step 2, a triangular inequality elimination (TIE) formulation is used to reject the impossible candidate code words [18]. If d ( c r , c i ) > 4 d ( c r , x ) , then d ( c i , x ) > d ( c r , x ) , thus the computation of d ( c i , x ) is eliminated. Where x is the input vector, c r is the reference code word. A group composed of all the code words, c i , which satisfy the above conditions is selected, then a group defined as a candidate search group (CSG) is built, and the number of code words in the CSG is symbolled as N ( c r ) .
TIE :   C S G ( c r ) = { c i | d ( c r , c i ) < 4 d ( c r , x ) } , 1 i C S i z e .
In step 3, after the C S G ( c r ) is obtained, the squared-error distortion between the input vector and each candidate code word is computed. The best-matched code word is the one that makes the squared-error distortion between the input vector, x n , and the candidate code word, c i , minimized.
As stated by BEI [30], a minimum squared-error distortion computation method called partial distortion elimination (PDE) is employed to reduce the number of multiplication operations. This method can decide whether the current code word is the best matched or not before the whole squared-error distortion is calculated. The pseudo-code of the PDE method is shown in Algorithm 2, where C S i z e , D i m , d min , C ( i , j ) are the codebook size, the dimension of the input vector, the minimum distortion value, and the code word in the codebook, respectively. After the abovementioned description, the encoding procedure of the proposed algorithm can be summarized as Algorithm 3.
Algorithm 2. Pseudo-code of the PDE algorithm
1    j = 0, d min = 2 ^ 8
2    whilej < C S i z e
3     d i s t = 0
4    i = 0
5    while ( d i s t < d min )
6     t m p = x ( j ) C ( i , j )
7     d i s t   =   d i s t + t m p * t m p
8    i = i + 1
9    end
10    if ((i = = D i m ) && ( d i s t < d min ))
11     d min = d i s t
12    index = j
13    end
14    j = j + 1
15    end
Algorithm 3. Encoding procedure of the proposed algorithm.
Step 1. Given a testing speech set and a value for T Q A .
Step 2. The input vector is quickly assigned to a corresponding subspace, b s s j , by (9) and (10).
Step 3. The number of candidate code words, N k ( T Q A ) , is found directly from the prebuilt squared-error distortion look-up table for each subspace.
Step 4. The code word corresponding to the highest hit probability is selected as a reference, c r , compute d ( c r , x ) , and then the C S G ( c r ) and N ( c r ) are obtained by (15).
Step 5. Starting at k = 1, the d ( c r , c k ) is obtained directly from the squared-error distortion look-up table.
Step 6. If ( d ( c r , c k ) < 4 d ( c r , x ) ) , then compute d ( c k , x ) by Algorithm 2, k = k + 1 ; repeat Step 4 until k = N ( c r ) . Then the index of the best-matched code word is obtained.
Step 7. Output index of the best-matched code word.
Step 8. Repeat Steps 2–6 until all the input vectors are encoded.

4. Experiment and Results

4.1. Experimental Environment

Here, the first-stage quantization procedure of LSF coefficients in G.729 was selected as a platform to illustrate the performance of the proposed algorithm. The first-stage codebook included 128 code words, and each code word was a 10-dimensional vector. There were 1024 subspaces. The Aurora speech dataset [31] was used as the training and testing speech data. There were 1001 clean speech files and 1001 speech files with noise from Test-A set, spoken by 50 males and 50 females used in this paper. The testing speech signals were sampled at 8 kHz with a resolution of 16 bits per sample.

4.2. Selection of the Training Dataset

As introduced in Section 3, the proposed method included a training procedure and an encoding procedure. The training procedure provided a squared-error look-up table for the encoding procedure. The selection of the training speech dataset directly affected the application scope of the squared-error look-up table. Further, it affected the computation loads and quantization accuracy of the subsequent encoding process. Therefore, we discuss the influence of the selection of the training dataset on the application scope of the squared-error look-up table.
The Aurora Test-A set included 1001 clean files and 1001 noisy speech files that were used to train and test the robustness of the proposed algorithm. Here we will compare the performance of the proposed method with three experimental environments. To evaluate the quantization accuracy of the proposed algorithm, a parameter defined as error rate (ER) was proposed, symbolized as E R = uncorrected   quantized   frames total   input   frames . The average search times are symbolized as ASN, and the reduction of the ASN is presented as a computational saving (CS) and symbolized as C S = ASN 1 ASN 2 ASN 1 , given to evaluate the reduction of the computational load. The following three experimental results were all obtained with the value T Q A = 0.99 .
For the first experimental conditions, the 1001 clean files, which included 350,866 speech frames, were all selected as the training set, then a squared-error look-up table which is symbolized as table A was obtained after the training procedure. Then, table A was employed in the encoding process. The testing datasets were clean files and noisy speech files, respectively. When there were 500 clean files, which included 174,630 speech frames used as the testing dataset, the experimental results show that there were 1412 uncorrected quantized frames, thus ER = 0.81%, and ASN = 18.82. When there were 201 speech files with noise, which included 70,170 frames used as a testing dataset, the experimental results show that there were 2579 uncorrected quantized frames, thus t ER = 3.7% and ASN = 18.9.
For the second experimental conditions, the training dataset included 500 clean speech files and 500 speech files with noise, which included 348,724 frames. Then, when the training dataset was used as a testing dataset, the experimental results show there were 1062 uncorrected quantized frames, thus E R = 0.7 % and ASN = 18.8. When the other 201 clean speech files, which included 70,170 frames used as testing data, the experimental result shows that there were 2038 uncorrected quantized frames, thus E R = 2.9 % and ASN = 19.3. When the other 201 speech files with noise, which included 70,170 frames used as a testing set, the experimental results show that there were 1975 uncorrected quantized frames, thus E R = 2.8 % and ASN = 18.9.
For the third experimental conditions, the training dataset included 1001 clean files and 1001 speech files with noise, which included 701,508 frames. When there were 201 clean speech files used as a testing set, the experimental results show that there were 556 uncorrected quantized frames, thus E R = 0.79 % and ASN = 20. When there were 201 speech files with noise, which included 70,170 frames used as a testing set, the experimental results show that there were 605 uncorrected quantized frames, thus E R = 0.8 % and ASN = 19.9.
Details of the above three experiments and the corresponding experimental results can be found in Table 3. Even under the worst training conditions, 1, where the training set was clean speech and the testing set was speech files with noise, the experimental results show that E R = 3.7 % and ASN = 18.9. Under the best training conditions, 3, the experimental results show that E R = 0.8 % and ASN = 20. Comparing the results of these three conditions, the ER value ranges from 0.7% to 3.7%, and the ASN value ranges from 18.82 to 20. It can be concluded that when the training set was large enough, the selection of the training set had no significant influence on the encoding process. The robustness of the prebuilt squared-error look-up table was good. The variation ranges of ER and ASN were within acceptable limits.

4.3. Performance of the Proposed Method

Here we choose experiment 1 to illustrate the performance of the proposed method. The generation of the squared-error look-up table is a very important process of the proposed algorithm. Thus, we extracted some intermediate experimental data as examples to illustrate the created procedure. Figure 3 illustrates the design procedure of the squared-error look-up table of the proposed algorithm. It shows that the generation of the squared-error look-up table can reduce the number of candidate code words significantly and reduce the search range.
The computational load and the quantization accuracy are compared for the proposed algorithm with TIE [18], ITIE [21], and BSS-ITIE [28] approaches. With the performance of the full search algorithm as the benchmark, Table 4 gives the comparison of ER, ASN, and CS for the proposed algorithm with TIE [18], ITIE [21], and BSS-ITIE [28] approaches. The experimental results show that the proposed algorithm provided CS of up to 92% when T Q A = 0.90 and when T Q A = 0.99 , it still reduced the computational load by 85%. Compared to the TIE and ITIE methods, the proposed method provided CS of up to 76% and 63% with almost the same quantization accuracy.
To further evaluate the reduction of computational load, the comparison of the average number of basic operations, including addition, multiplication, and comparison, is shown in Table 5 and is illustrated as a bar graph in Figure 4. The multiplication operation was the dominant computation, with the highest computational complexity. The reduction in the number of multiplications is the load reduction (LR), symbolized as L R = MulN 1 MulN 2 MulN 1 , where MulN is the number of multiplications. The proposed algorithm provided LR up to 90% in the full search algorithm, with almost the same quantization accuracy.
Table 6 and Figure 5 give the comparison results with the BSS-ITIE [28] as the benchmark. When T Q A = 0.99 , the ASN of the BSS-ITIE algorithm was 18.47 with E R = 4.66 % . In comparison, the ASN of the proposed algorithm was 18.82 with E R = 0.81 % , and L R = 57 % . This indicates the proposed algorithm can obtain a better speech quality than the BSS-ITIE algorithm with great reduction of the number of multiplications. On the other hand, when T Q A = 0.95 , the ASN of the proposed algorithm was 13.10 with E R = 4.08 % . When T Q A = 0.94 , the ASN of the proposed algorithm was 12.33 with E R = 4.86 % . This indicates the proposed algorithm provided C S of about 29–33%, and LR up to 67–69%, over the BSS-ITIE algorithm with almost the same E R .
Figure 6 shows that when ASN was about equal to 19, the E R of the proposed method was equal to 0.81%, while with the BSS-ITIE it was equal to 4.66%. For instance, when ASN was approximately equal to 13, the E R of the proposed method was lower than that of the BSS-ITIE method by about 5%. When E R was approximately equal to 4%, the ASN of the proposed method was about 5.5 lower than that of the BSS-ITIE method. Thus, the proposed algorithm had a significantly better performance than the BSS-ITIE method.
In addition, to better measure the quantization error, the average vector quantization error (AVQR) was defined as the absolute error value between the quantized code word and the best-matched code word. The AVQR was computed by Equation (16).
A V Q R = i = 1 i = L a b s ( c ^ i c i ) L ,
where c ^ i was the quantized code word, and c i was the best-matched code word with the input vector which was searched by the full search algorithm. L was the total number of input speech frames. The AVQR value of the BSS-ITIE [22] and the proposed algorithm were computed, while the TQA ranged from 0.90 to 0.99, respectively. Table 7 shows the AVQR comparison between the BSS-ITIE [22] method and the proposed method. The experimental results show that all the AVQR values of the proposed method were lower than 0.1, and the AVQR value of the BSS-ITIE method ranged from 0.0695 to 0.2324. Further, the max value of AVQR for the proposed method was 0.0974 when TQA = 0.90, which is about equal to the AVQR value of the BSS-ITIE method when TQA = 0.98. Thus, the experimental results show that the proposed method can obtain a much lower quantization error than the BSS-ITIE method.

5. Conclusions

In this paper, an efficient codebook search algorithm for the VQ of the LSF coefficients is proposed to reduce the computation load. A squared-error look-up table was prebuilt in the training procedure and then the encoding procedure began. An input vector was quickly assigned to a search subspace, then the CSG was obtained by employing the TIE equation. Subsequently, a PDE technique was employed to reduce the number of multiplications. The experimental results show that the proposed algorithm provided a CS of up to 85% in the full search algorithm, up to 76% in the TIE algorithm, and 63% in the iterative TIE (ITIE) algorithm when T Q A = 0.99 . Compared to the BSS-ITIE algorithm, the proposed method provided a CS and LR of up to 29–33% and 67–69%, respectively, with almost the same quantization accuracy. Further, a trade-off between the computation loads and quantization accuracy could easily be made to meet a user’s requirement when performing VQ encoding. This work would be beneficial for reaching the energy-saving requirement when implemented in a speech codec of mobile devices, and the reduction of computation load is helpful for the G.729 Recommendation’s application in real-time speech signal processing systems.

Author Contributions

Y.X. developed the idea and wrote this article. Y.W., Z.Y., J.J., Y.Z., X.F. and S.Q. put forward some constructive suggestions for revision. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Acknowledgments

I would like to thank the Smart Sensing R&D Center, Institute of Microelectronics of the Chinese Academy of Sciences, which supported us in this work.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

VQVector quantization
LPCLinear prediction coding
LSFLine spectrum frequency
BSS-VQbinary space search vector quantization
CSGcandidate search group
TQAthreshold of quantization accuracy
TIEtriangular inequality elimination
ITIEiterative triangular inequality elimination
PDEpartial distortion elimination
ASNaverage search numbers
CScomputational saving
LRload reduction
CS-ACELPconjugate-structure algebraic-code-excited linear prediction
EEENNSequal-average equal-variance equal-norm nearest neighbor search
AVQRaverage vector quantization error.

References

  1. Cheng, Z.; Yang, F.; Gao, B. Partial Discharge Pattern Recognition of XLPE Cable Based on Vector Quantization. IEEE Trans. Magn. 2019, 55, 1–4. [Google Scholar] [CrossRef]
  2. Lu, X.; Wang, H.; Dong, W. Learning a Deep Vector Quantization Network for Image Compression. IEEE Access 2019, 7, 118815–118825. [Google Scholar] [CrossRef]
  3. Wu, Z.-B.; Yu, J. Vector quantization: A review. Front. Inf. Technol. Electron. Eng. 2019, 20, 507–524. [Google Scholar] [CrossRef]
  4. Gray, R.M. Vector quantization. IEEE ASSP Mag. 1984, 1, 4–29. [Google Scholar] [CrossRef]
  5. Makhoul, J.; Roucos, S.; Gish, H. Vector Quantization in Speech Coding. Proc. IEEE 1985, 73, 1551–1588. [Google Scholar] [CrossRef]
  6. Linde, Y.; Buzo, A.; Gray, R.M. An Algorithm for Vector Quantizer Design. IEEE Trans. Commun. 1980, 28, 84–95. [Google Scholar] [CrossRef] [Green Version]
  7. Mobini, N.; Vahdat, B.; Radfar, M.H. An FPGA based implementation of G.729. In Proceedings of the IEEE International Symposium on Circuits and Systems, Kobe, Japan, 23–26 May 2005. [Google Scholar]
  8. Hwang, S.-H. Computational improvement for G.729 standard. Electron. Lett. 2000, 36, 1163–1164. [Google Scholar] [CrossRef]
  9. Sheikh, N.M.; Siddiqui, K.I. Real-time implementation and optimization of ITU-T’s G.729 speech codec running at 8 kbits/sec using CS-ACELP on TM-1000 VLIW DSP CPU. In Proceedings of the IEEE International Multi Topic Conference, 2001. IEEE INMIC 2001. Technology for the 21st Century, Lahore, Pakistan, 30 December 2001. [Google Scholar]
  10. Chen, C.; Fu, X. G.729/A Speech Coder: Multichannel TMS320C62x Implementation. 2000. Available online: https://www.ti.com/lit/an/spra564b/spra564b.pdf?ts=1612342823282&ref_url=https%253A%252F%252Fwww.google.com.hk%252F (accessed on 3 February 2021).
  11. Swee, L.H. Implementation of G.729 on the TMS320C54x. 2000. Available online: https://www.ti.com/lit/an/spra656/spra656.pdf (accessed on 3 February 2021).
  12. Zhang, Z.; Wang, G.; Zhang, Y. Implementation of G.729 algorithm based on ARM9. In Proceedings of the 2012 2nd International Conference on Consumer Electronics, Communications and Networks (CECNet), Yichang, China, 21–23 April 2012. [Google Scholar]
  13. Chang, R.F.; Chen, W.T.; Wang, J.S. Image sequence coding using adaptive tree-structured vector quantisation with multipath searching. IEEE Proc. I Commun. Speech Vis. 1992, 139, 9–14. [Google Scholar] [CrossRef]
  14. Chou, P.A.; Lookabaugh, T.; Gray, R.M. Optimal pruning with applications to tree-structured source coding and modeling. IEEE Trans. Inf. Theory 1989, 35, 299–315. [Google Scholar] [CrossRef]
  15. Balakrishnan, M.; Pearlman, W.A.; Lu, L. Variable-rate tree-structured vector quantizers. IEEE Trans. Inf. Theory 1995, 41, 917–930. [Google Scholar] [CrossRef]
  16. Yang, S.-B. Variable-branch tree-structured vector quantization. IEEE Trans. Image Process. 2004, 13, 1275–1285. [Google Scholar] [CrossRef] [PubMed]
  17. Chu, C.-P.; Hwang, S.-H.; Chang, S.-C. An improvement to tree-structured vector quantization. Appl. Mech. Mater. 2013, 284–287, 2926–2929. [Google Scholar] [CrossRef]
  18. Huang, S.-H.; Chen, S.-H. Fast encoding algorithm for VQ-based image coding. Electron. Lett. 1990, 26, 1618–1619. [Google Scholar] [CrossRef]
  19. Hsieh, C.-H.; Liu, Y.-J. Fast search algorithms for vector quantization of images using multiple triangle inequalities and wavelet transform. IEEE Trans. Image Process. 2000, 9, 321–328. [Google Scholar] [CrossRef]
  20. Huang, C.-J.; Yeh, C.-Y.; Hwang, S.-H. An improvement of the Triangular Inequality Elimination Algorithm for Vector Quantization. Appl. Math. Inf. Sci. 2015, 9, 229–235. [Google Scholar] [CrossRef]
  21. Yeh, C.-Y. Iterative Triangular Inequality Elimination Algorithm for Codebook Search of Vector Quantization. IEEJ Trans. Electr. Electron. Eng. 2018, 13, 1528–1529. [Google Scholar] [CrossRef]
  22. Ra, S.-W.; Kim, J.-K. A fast mean-distance-ordered partial codebook search algorithm for image vector quantization. IEEE Trans. Circuits Syst. II Analog Digit. Signal Process. 1993, 40, 576–579. [Google Scholar] [CrossRef]
  23. Lu, Z.M.; Sun, S.H. Equal-average equal-variance equal-norm nearest neighbor search algorithm for vector quantization. IEICE Trans. Inf. Syst. 2003, 86, 660–663. [Google Scholar]
  24. Chen, S.X.; Li, F.W. Fast encoding method for vector quantisation of image using subvector characteristics and Hadamard transform. IET Image Process. 2011, 5, 18–24. [Google Scholar] [CrossRef]
  25. Lin, T.-H.; Yeh, C.-Y.; Hwang, S.-H.; Chang, S.-C. Efficient binary search space-structured VQ encoder applied to a line spectral frequency quantisation in G.729 standard. IET Commun. 2016, 10, 1183–1188. [Google Scholar] [CrossRef]
  26. Yeh, C.-Y. An Efficient VQ Codebook Search Algorithm Applied to AMR-WB Speech Coding. Symmetry 2017, 9, 54. [Google Scholar] [CrossRef]
  27. Yeh, C.-Y. An efficient search algorithm for ISF vector quantization in AMR-WB speech codec. IEEJ Trans. 2016, 11, 829–831. [Google Scholar] [CrossRef]
  28. Yeh, C.-Y.; Huang, H.-H. An Upgraded Version of the Binary Search Space-Structured VQ Search Algorithm for AMR-WB Codec. Symmetry 2019, 11, 283. [Google Scholar] [CrossRef] [Green Version]
  29. ITU-T Recommendation. G.729: Coding of Speech at 8 kbit/s Using Conjugate-Structure Algebraic-Code-Excited Linear Prediction (CS-ACELP); International Telecommunication Union: Geneva, Switzerland, 1996. [Google Scholar]
  30. Bei, C.-D.; Gray, R.M. An improvement of the minimum distortion encoding algorithm for vector quantization. IEEE Trans. Commun. 1985, 33, 1132–1133. [Google Scholar]
  31. Aurora Corpus. Available online: http://portal.elda.org/en/catalogues/free-resources/free-lrs-set-1/ (accessed on 15 November 2020).
Figure 1. Structure of the two-stage vector quantization (VQ) for line spectrum frequency (LSF) coefficients.
Figure 1. Structure of the two-stage vector quantization (VQ) for line spectrum frequency (LSF) coefficients.
Electronics 10 00380 g001
Figure 2. Structure of the proposed search algorithm.
Figure 2. Structure of the proposed search algorithm.
Electronics 10 00380 g002
Figure 3. The squared-error distortion look-up table is designed for each subspace.
Figure 3. The squared-error distortion look-up table is designed for each subspace.
Electronics 10 00380 g003
Figure 4. Bar graph representation of Table 4.
Figure 4. Bar graph representation of Table 4.
Electronics 10 00380 g004
Figure 5. Bar graph representation of Table 6.
Figure 5. Bar graph representation of Table 6.
Electronics 10 00380 g005
Figure 6. Comparison of the ER and ASN between the BSS-TIIE [28] method and the proposed algorithm.
Figure 6. Comparison of the ER and ASN between the BSS-TIIE [28] method and the proposed algorithm.
Electronics 10 00380 g006
Table 1. The value of the MA predictor coefficients.
Table 1. The value of the MA predictor coefficients.
p0kMA Predictor Coefficients
010.25700.27800.28000.27360.27570.27640.26750.26780.27790.2647
20.21420.21940.23310.22300.22720.22520.21480.21230.21150.2096
30.16700.15230.15670.15800.16010.15690.15890.15550.14740.1571
40.12380.09250.07980.09230.08900.08280.10100.09880.08720.1060
110.23600.24050.24990.24950.25170.25910.26360.26250.25510.2310
20.12850.09250.07790.10600.11830.11760.12770.12680.11930.1211
30.09810.05890.04010.06540.07610.07280.08410.08260.07760.0891
40.09230.04860.02870.04980.05260.04820.06210.06360.05840.0794
Table 2. Bit allocation of the LSF quantizer.
Table 2. Bit allocation of the LSF quantizer.
ProcedureCode IndexBits
First stage10th orderl17
Second stage5th low orderl25
5th high orderl35
Selection of predictive filterp01
Total18
Table 3. The selection of the training dataset.
Table 3. The selection of the training dataset.
Experimental ConditionsTraining SetTesting SetERASN
Conditions 11001 clean files500 clean files0.81%18.82
201 files with noise3.7%18.9
Conditions 2500 clean and 500 files with noiseTraining set0.7%18.8
201 clean files2.9%19.3
201 files with noise2.8%18.9
Conditions 31001 clean and 1001 files with noise201 clean files0.79%20
201 files with noise0.8%19.9
Table 4. Comparison of the computational load and ER of various methods.
Table 4. Comparison of the computational load and ER of various methods.
MethodsERASNCS
Full search algorithm0128Benchmark
TIE078.3738.77%
ITIE051.2160%
BSS-ITIE
(TQA)
0.9013.85%10.3991.88%
0.9113.10%10.8491.53%
0.9212.20%11.3591.13%
0.9311.32%11.8890.72%
0.9410.38%12.5490.20%
0.959.28%13.2889.63%
0.968.28%14.1188.98%
0.977.02%15.2388.10%
0.985.97%16.5387.09%
0.994.66%18.4785.57%
Proposed (TQA)0.907.89%10.1692.06%
0.917.15%10.6091.72%
0.926.37%11.1091.33%
0.935.65%11.6590.90%
0.944.86%12.3390.37%
0.954.08%13.1089.77%
0.963.35%13.98 89.08%
0.972.47%15.1788.15%
0.981.67%16.6187.02%
0.990.81%18.8285.30%
Table 5. Comparison of the basic operation numbers between the proposed method and other methods.
Table 5. Comparison of the basic operation numbers between the proposed method and other methods.
MethodsTQAAdditionsMulNComparisonsLR
Full search algorithm-25601280128Benchmark
TIE-165479420638%
ITIE-97862836951%
BSS-ITIE0.9937929110677%
Proposed0.995181255090%
0.95387953792.5%
0.94369913692.8%
Table 6. Computational savings comparison between the BSS-ITIE [28] method and the proposed algorithm.
Table 6. Computational savings comparison between the BSS-ITIE [28] method and the proposed algorithm.
MethodsTQAERASNMulNLRCS
BSS-ITIE 0.994.66%18.47291Benchmark
Proposed0.990.81%18.8212557%0
0.954.08%13.109567%29%
0.944.86%12.339169%33%
Table 7. Average vector quantization error comparison between the BSS-ITIE [28] method and the proposed method.
Table 7. Average vector quantization error comparison between the BSS-ITIE [28] method and the proposed method.
TQABSS-ITIEProposed
0.900.23240.0974
0.910.21660.0872
0.920.19930.0764
0.930.18210.0673
0.940.16480.0572
0.950.14500.0475
0.960.12730.0386
0.970.10740.0278
0.980.09050.0185
0.990.06950.0089
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Xue, Y.; Wang, Y.; Jiang, J.; Yu, Z.; Zhan, Y.; Fan, X.; Qiao, S. An Efficient Codebook Search Algorithm for Line Spectrum Frequency (LSF) Vector Quantization in Speech Codec. Electronics 2021, 10, 380. https://doi.org/10.3390/electronics10040380

AMA Style

Xue Y, Wang Y, Jiang J, Yu Z, Zhan Y, Fan X, Qiao S. An Efficient Codebook Search Algorithm for Line Spectrum Frequency (LSF) Vector Quantization in Speech Codec. Electronics. 2021; 10(4):380. https://doi.org/10.3390/electronics10040380

Chicago/Turabian Style

Xue, Yuqun, Yongsen Wang, Jianhua Jiang, Zenghui Yu, Yi Zhan, Xiaohua Fan, and Shushan Qiao. 2021. "An Efficient Codebook Search Algorithm for Line Spectrum Frequency (LSF) Vector Quantization in Speech Codec" Electronics 10, no. 4: 380. https://doi.org/10.3390/electronics10040380

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop