Patent Publication Number: US-5528727-A

Title: Adaptive pitch pulse enhancer and method for use in a codebook excited linear predicton (Celp) search loop

Description:
This is a continuation application Ser. No. 07/970,447, filed Nov. 2, 1992, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a codebook excited linear prediction (CELP) coder. 
     The invention has particular application in digital cellular networks but may also be advantageous in any telecommunications product line that employs low bit rate CELP voice coding. 
     2. Description of the Related Art 
     Cellular telecommunications systems in North America are rapidly evolving from their current analog frequency modulated form towards digital systems. Typically, such digital cellular communication systems use a CELP technique for low rate speech coding. The technique involves searching a table or codebook of excitation vectors for that vector which, when filtered through a linear predictive filter, produces an output sequence which is closest to the input sequence. This output sequence of synthesized speech codes occurs upon excitation of the input sequence which in turn occurs upon the introduction of the digital equivalent of analog speech. 
     While conventional CELP techniques hold the most promise for high quality at bit rates in the vicinity of 8.0 Kbps, the quality suffers at lower bit rates approaching 4.0 Kbps. In particular, because the adaptive codebook in the CELP search loop is quite &#34;flat,&#34; i.e. has a restricted variety of adaptive codebook vectors, during unvoiced speech periods, the CELP search loop has difficulty in generating periodic pulses at the onset of voiced speech. Thus, there is often a lag in the time it takes for the adaptive codebook to converge to a pitch pulse structure sufficient to synthesize voiced speech. This typically results in the cutting off of speech, especially during short speech spurts. 
     SUMMARY OF THE INVENTION 
     The present invention provides an improved CELP search loop and method for use in a CELP coder. It provides a pitch pulse enhancer and method for use in a CELP search loop of a CELP coder that will enhance the pitch pulse structure of an adaptive codebook of the CELP search loop by speeding up the convergence of the adaptive codebook. This is in part because the pitch pulse enhancer is adaptive to a voicing measure of input speech. Additional advantages of the invention will be set forth in the description which follows. 
     In accordance with the invention as embodied and broadly described here, a CELP search loop for coding an input signal is provided comprising adaptive codebook means for storing a variable set of excitation vectors, fixed codebook means for storing a fixed set of excitation vectors, codebook searching means for searching the adaptive codebook to determine an optimal adaptive codebook excitation vector, and for searching the fixed codebook to determine an optimal fixed codebook excitation vector, total excitation vector producing means for producing a total excitation vector from the optimal adaptive codebook excitation vector and the optimal fixed codebook excitation vector, voicing measure determining means for determining a voicing measure of the input signal, the voicing measure being voiced when the input signal includes voiced speech and the voicing measure being unvoiced when the input signal does not include voiced speech, modifying means for modifying the total excitation vector in accordance with the voicing measure of the input signal, and updating means for updating the adaptive codebook means by storing the modified total excitation vector in the adaptive codebook means. 
     In accordance with another aspect of the invention as embodied and broadly described here, an adaptive pitch pulse enhancer for use in a CELP search loop is provided, the CELP search loop including an adaptive codebook having a variable set of excitation vectors stored therein, a fixed codebook having a fixed set of excitation vectors stored therein, an adaptive codebook search loop for searching the adaptive codebook to determine an optimal adaptive codebook excitation vector, and a fixed codebook search loop for searching the fixed codebook to determine an optimal fixed codebook excitation vector, the CELP search loop producing a total excitation vector from the optimal adaptive codebook excitation vector and the optimal fixed codebook excitation vector, and the adaptive pitch pulse enhancer comprising voicing measure determining means for determining a voicing measure of the input signal, the voicing measure being voiced when the input signal includes voiced speech and the voicing measure being unvoiced when the input signal does not include voiced speech, modifying means for modifying the total excitation vector in accordance with the voicing measure of the input signal, and updating means for updating the adaptive codebook by storing the modified total excitation vector in the adaptive codebook. 
     In accordance with yet another aspect of the invention as embodied and broadly described here, a method of coding an input signal using a CELP search loop is provided comprising the steps of storing a variable set of excitation vectors in an adaptive codebook, storing a fixed set of excitation vectors in a fixed codebook, searching the adaptive codebook to determine an optimal adaptive codebook excitation vector, searching the fixed codebook to determine an optimal fixed codebook excitation vector, producing a total excitation vector from the optimal adaptive codebook excitation vector and the optimal fixed codebook excitation vector, determining a voicing measure of the input signal, the voicing measure being voiced when the input signal includes voiced speech and the voicing measure being unvoiced when the input signal does not include voiced speech, modifying the total excitation vector in accordance with the voicing measure of the input signal, and updating the adaptive codebook by storing the modified total excitation vector in the adaptive codebook. 
     In accordance with still another aspect of the invention as embodied and broadly described here, in a CELP search loop including an adaptive codebook having a variable set of excitation vectors stored therein, a fixed codebook having a fixed set of excitation vectors stored therein, an adaptive codebook search loop for searching the adaptive codebook to determine an optimal adaptive codebook excitation vector, and a fixed codebook search loop for searching the fixed codebook to determine an optimal fixed codebook excitation vector, the CELP search loop producing a total excitation vector from the optimal adaptive codebook excitation vector and the optimal fixed codebook excitation vector, a method of enhancing the pitch pulse structure of the adaptive codebook is provided comprising the steps of determining a voicing measure of the input signal, the voicing measure being voiced when the input signal includes voiced speech and the voicing measure being unvoiced when the input signal does not include voiced speech, modifying the total excitation vector in accordance with the voicing measure of the input signal, and updating the adaptive codebook by storing the modified total excitation vector in the adaptive codebook. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate a presently preferred embodiment of the invention and, together with the general description given above and the detailed description of the preferred embodiment given below, serve to explain the principles of the invention. In the drawings: 
     FIG. 1 illustrates a block diagram of a CELP search loop for use in a CELP coder in accordance with a preferred embodiment of the present invention; 
     FIG. 2 illustrates a block diagram of the voicing measurer of the CELP search loop of FIG. 1; 
     FIGS. 3(a)-3(b) illustrate an operation flow diagram of the CELP search loop of FIG. 1; and 
     FIG. 4 illustrates an operation flow diagram of the pitch pulse enhancer and voicing measurer of FIG. 2. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT AND METHOD 
     Reference will now be made in detail to a presently preferred embodiment of the invention as illustrated in the accompanying drawings, in which like reference characters designate like or corresponding parts throughout the several drawings. 
     As shown in FIG. 1, there is provided a CELP search loop 10 incorporating the teachings of the present invention. CELP search loop 10 comprises a preprocessor 20, subtracters 30, 40 and 50, a linear prediction filter 60, an adaptive codebook 70, a fixed codebook 80, multipliers 90 and 100, an adder 110, weighting filters 120 and 130, summers 140 and 150, a subframe delay 160, a pitch pulse enhancer 170, a rescaler 180, and a voicing measurer 190. 
     Preferably, CELP search loop 10 of FIG. 1 comprises firmware which can be processed by a digital signal processor, such as the Texas Instrument TMS320C30, as is known to those skilled in the art. It should be understood that, although linear prediction filter 60 is shown in FIG. 1 as three separate functional blocks, linear prediction filter 60, preferably, comprises a single functional unit. It should also be understood that subframe delay 160 is a conceptual functional block only as is known to those skilled in the art and is, therefore, indicated by dashed lines. 
     Operation of CELP search loop 10 will now be described in detail with reference to the block diagram shown in FIG. 1 and flow diagram 1000 shown in FIGS. 3(a)-3(b). CELP search loop 10, preferably, operates on a subframe basis, that is, each pass of flow diagram 1000 is performed on a single subframe in a sequence of subframes of digitized data. Further, each subframe, preferably, comprises a block of 40 samples of an input analog speech signal. 
     With reference to FIGS. 3(a)-3(b), in step S1010, an input digitized speech signal S(n), which is the nth subframe of digitized data in a sequence of n subframes, is preprocessed by preprocessor 20. Preferably, preprocessor 20 comprises a high pass filter for high pass filtering S(n) to produce S&#39;(n), as is known to those skilled in the art. Control then passes to step S1020. 
     In step S1020, the &#34;ring down,&#34; i.e., the zero-input response, of linear prediction filter 60 is subtracted from S&#39;(n) to produce S.sup.˜ (n), as is known to those skilled in the art. Control then passes to step S1030. 
     In step S1030, an adaptive codebook search routine is performed, whereby the contents of adaptive codebook 70 are sequentially searched and analyzed to select an optimal adaptive codebook excitation vector which, when processed by linear prediction filter 60, most nearly resembles S.sup.˜ (n). 
     Specifically, adaptive codebook 70 comprises a table having p locations for storing a variable set of excitation vectors VA m  (n), where m=1 through p and corresponds to a location in adaptive codebook 70. These excitation vectors are sequentially read out from adaptive codebook 70 in accordance with a corresponding adaptive codebook index ACindex m  (n). 
     As each excitation vector VA m  (n) is read out from adaptive codebook 70, it is multiplied by a corresponding gain GA m  (n) at multiplier 90 and then applied to linear prediction filter 60. Linear prediction filter 60 comprises, for example, an all-pole filter which processes the incoming excitation vector into a synthesized speech signal SA m  (n), as is known to those skilled in the art. 
     Next, synthesized speech signal SA m  (n) is subtracted from S.sup.˜ (n) at subtracter 40 to produce a difference signal DA m  (n). It should be understood that difference signal DA m  (n) is an indication of how closely excitation vector VA m  (n), when multiplied by gain GA m  (n) and processed by linear prediction filter 60, resembles S.sup.˜ (n). In particular, the smaller the difference signal DA m  (n), the closer the resemblance. This difference signal is then weighted by weighting filter 120 and summed over the length of the subframe S(n) by summer 140. The output of summer 140 is then used to vary adaptive codebook index ACindex m  (n) to select the next excitation vector from adaptive codebook 70, as is also known to those skilled in the art. 
     The above adaptive codebook search routine continues until each of the vectors VA 1  (n) through VA p  (n) is read from adaptive codebook 70, multiplied by a respective gain at multiplier 90, processed by linear prediction filter 60, and compared to S.sup.˜ (n). Upon completion of the adaptive codebook search routine, the optimal adaptive codebook excitation vector, i.e., that excitation vector VA 1  (n) through VA p  (n) which, when multiplied by its respective gain and processed by linear prediction filter 60, most nearly resembles S.sup.˜ (n), is applied to adder 110. The optimal adaptive codebook excitation vector is found by comparing the difference signals produced at subtracter 40 for each excitation vector VA 1  (n) through VA p  (n) and selecting the excitation vector which produces the smallest difference signal. As shown in FIG. 1, the optimal adaptive codebook excitation vector is designated as VAopt(n). Control then passes to step S1040. 
     In step S1040, an adaptive codebook residual signal, i.e., the difference signal produced by the subtraction of the synthesized speech signal corresponding to optimal adaptive codebook excitation vector VA opt  (n) from S.sup.˜ (n) at subtracter 40, is provided at subtracter 50. As shown in FIG. 1, this residual signal is designated as R(n). Upon completion of step S1040, control passes to step S1050. 
     In step S1050, a fixed codebook search routine is performed, whereby the contents of fixed codebook 80 are sequentially searched and analyzed to select an optimal fixed codebook excitation vector which, when processed by linear prediction filter 60, most nearly resembles residual signal R(n). It should be evident from the following that the fixed codebook search routine is somewhat similar to the adaptive codebook search routine. 
     Specifically, fixed codebook 80 comprises a table having r locations for storing a fixed set of excitation vectors VF d  (n), where d=1 through r and corresponds to a location in fixed codebook 80. These excitation vectors are sequentially read out from fixed codebook 80 in accordance with a corresponding fixed codebook index FCindex d  (n). 
     As each vector VF d  (n) is read out from fixed codebook 80, it is multiplied by a corresponding gain GF d  (n) at multiplier 00 and then applied to linear prediction filter 60. As described above with regard to the adaptive codebook search routine, linear prediction filter 60 comprises, for example, an all-pole filter which processes the incoming excitation vector into a synthesized speech signal SF d  (n), as is known to those skilled in the art. 
     Next, synthesized speech signal SF d  (n) is subtracted from residual signal R(n) at subtracter 50 to produce a difference signal DF d  (n). Again, as was the case with the adaptive codebook search routine, the difference signal DF d  (n) is an indication of how closely excitation vector VF d  (n), when multiplied by gain GF d  (n) and processed by linear prediction filter 60, resembles residual signal R(n). This difference signal is then weighted by weighting filter 130 and summed over the length of subframe S(n) by summer 150. The output of summer 150 is then used to vary fixed codebook index FCindex d  (n) to select the next excitation vector from fixed codebook 80, as is known to those skilled in the art. 
     The above fixed codebook search routine continues until each of the vectors VF 1  (n) through VF r  (n) is read from fixed codebook 80, multiplied by a respective gain at multiplier 100, processed by linear prediction filter 60, and compared to residual signal R(n). Upon completion of the fixed codebook search routine, the optimal fixed codebook excitation vector, i.e., that excitation vector VF 1  (n) through VF r  (n) which, when multiplied by its respective gain and processed by linear prediction filter 60, most nearly resembles residual signal R(n), is applied to adder 110. As explained above with regard to the adaptive codebook search routine, the optimal fixed codebook excitation vector is found by comparing the difference signals produced at subtracter 50 for each excitation vector VF 1  (n) through VF r  (n) and selecting the excitation vector which produces the smallest difference signal. As shown in FIG. 1, the optimal fixed codebook excitation vector is designated as VFopt(n). Upon completion of step S1050, control passes to step S1060. 
     In step S1060, optimal adaptive and fixed codebook excitation vectors VAopt(n) and VFopt(n) are added together by adder 110 to produce total excitation vector X(n). Control then passes to step S1070. 
     In step S1070, total excitation vector X(n) is modified by pitch pulse enhancer 170 using a nonlinear function to produce Y.sup.˜ (n) as follows: 
     
         Y.sup.˜ (n)=X(n).sup.PEFACT                          (1.0) 
    
     where PEFACT is termed a pitch enhancement factor and is, preferably, a positive number greater than or equal to unity. As will be explained below, pitch enhancement factor PEFACT is adaptive to a voicing measure VM(n) determined by voicing measurer 190. 
     Step S1070 will now be described in detail with reference to the block diagram shown in FIG. 2 and the flow diagram 2000 shown in FIG. 4. 
     As shown in FIG. 2, voicing measurer 190 of FIG. 1 comprises an average pitch prediction gain unit 200, an average pitch lag deviation unit 210, an average adaptive codebook gain unit 220, and classification logic 230. 
     With reference to FIG. 4, as will be explained below, in steps S2020, S2040 and S2060, average pitch prediction gain unit 200, average pitch lag deviation unit 210, and average adaptive codebook gain unit 220 determine various parameters. These parameters are compared to respective threshold values by classification logic 230 in steps S2030, S2050 and S2070, to determine voicing measure VM(n) of subframe S(n). It should be noted that voicing measure VM(n) indicates an absence (unvoiced; VM(n)=0) or presence (voiced; VM(n)=1) of voiced speech in subframe S(n). 
     In step 2010, voicing measurer 190 initializes pitch enhancement factor PEFACT. Preferably, pitch enhancement factor PEFACT is initialized such that it equals one. Control then passes to step S2020. 
     In step S2020, average pitch prediction gain unit 200 determines an average pitch prediction gain APG. In particular, average pitch prediction gain unit 200 receives as input signals total excitation vector X(n) and adaptive codebook excitation vector VA m  (n) and determines a pitch prediction gain PG, as follows: ##EQU1## where N is the frame length of subframe S(n) and, as explained above preferably equals 40 samples. Then, average pitch prediction unit 200 determines average pitch prediction gain APG by averaging pitch prediction gain PG over M subframes, as follows: ##EQU2## Preferably, M is equal to 5-10 subframes. Upon completion of step S2020, control passes to step S2030. 
     In step S2030, classification logic 230 compares average pitch prediction gain APG to a first pitch prediction gain threshold APG thresh1 . It should be understood that the value of APG thresh1  depends on the application of the present invention and can be determined by one skilled in the art. If classification logic 230 determines that APG is greater than APG thresh1 , control passes to step S2090, wherein classification logic 230 sets voicing measure VM(n) equal to one (indicating that subframe S(n) is voiced) and control then passes to step S2100. Otherwise, control passes to step S2040. 
     In step S2040, average pitch lag deviation unit 210 determines an average pitch lag deviation APD. In particular, average pitch lag deviation unit 210 receives as an input signal adaptive codebook index ACindex m  (n) and determines average pitch lag deviation APD, as follows: ##EQU3## where M is, again, the number of subframes over which the average is taken, NINT is a nearest integer function and d(i) is determined as follows: ##EQU4## where MACindex m  =Median (ACindex m  (i), i=1, 2, . . . , M). Upon completion of step S2040, control passes to step S2050. 
     In step S2050, classification logic 230 compares average pitch lag deviation APD to a first pitch lag threshold APD thresh1 . Again, it should be understood that the value of APD thresh1  depends on the application of the present invention and can be determined by one skilled in the art. If classification logic 230 determines that APD is less than APD thresh1 , control passes to step S2090, wherein classification logic 230 sets voicing measure VM(n) equal to one (indicating that subframe S(n) is voiced) and control then passes to step S2100. Otherwise, control passes to step S2060. 
     In step S2060, average adaptive codebook gain unit 220 determines an average adaptive codebook gain ACG. In particular, average adaptive codebook gain unit 220 receives as an input signal adaptive codebook gain G M  (n) and determines average adaptive codebook gain ACG, as follows: ##EQU5## where, as explained above, M is the number of subframes over which the average is taken. Control then passes to step S2070. 
     In step S2070, classification logic 230 compares average pitch prediction gain to a second pitch prediction gain threshold APG thresh2 , compares average pitch lag deviation APD to a second pitch lag threshold APD thresh2 , and compares average adaptive codebook gain ACG to a first adaptive codebook gain threshold ACG thresh1 . Once again, it should be understood that the values of these thresholds depend on the application of the present invention and can be determined by one skilled in the art. 
     If classification logic 230 determines that APG is greater than APG thresh2 , that APD is less than APD thresh2  and that ACG is greater than ACG thresh1 , then control passes to step S2090, wherein classification logic 230 sets voicing measure VM(n) equal to one (indicating that subframe S(n) is voiced) and control then passes to step S2100. Otherwise, control passes to step S2080. 
     In step S2080, classification logic 230 sets voicing measure VM(n) equal to zero. As explained above, this indicates that subframe S(n) is unvoiced. Control then passes to step S2100. 
     In step S2100, pitch pulse enhancer 170 updates pitch enhancement factor PEFACT in accordance with voicing measure VM(n), as follows: 
     
         If VM(n)=0, then PEFACT=PEFACT.sup.(1.5)                   (6.0) 
    
     
         IF VM(n)=1, then PEFACT=PEFACT.sup.(0.93)                  (6.2) 
    
     Preferably, PEFACT is clamped such that 1.05≦PEFACT≦1.18. It should be understood that the above described values of PEFACT can be modified as appropriate to suit a particular application of the present invention as is known to those skilled in the art. Upon completion of step S2100, control passes to step S2110. 
     In step S2110, pitch pulse enhancer modifies total excitation vector X(n) to produce Y˜(n) as shown above in Eqn. 1.0. Control then passes to step S1080 of FIG. 3(b). 
     It should be evident from the above description of voicing measurer 190 that the voicing measure of subframe S(n) is determined by using only synthesis parameters, thereby eliminating the need of explicitly transmitting voicing information to the synthesis side of CELP search loop 10. 
     Referring back to the block diagram of FIG. 1 and flow diagram 1000 of FIGS. 3(a)-3(b), in step S1080, rescaler 180 rescales Y˜(n) to produce Y(n), as follows: 
     
         Y(n)=aY˜(n)                                          (7.0) 
    
     where ##EQU6## Again, N is the length of subframe S(n). It should be understood that step S1080 is provided to maintain the energy level of total excitation vector X(n) in Y(n). In particular, step S1070 has the effect of altering the total energy level of total excitation vector X(n) and step S1080 serves to restore the total energy of Y˜(n) to that level. Upon completion of step S1080, control passes to step S1090. 
     In step S1090, rescaler updates adaptive codebook 70 using Y(n). In particular, Y(n) is stored in adaptive codebook 70 as a new excitation vector for use in the processing of a subsequent input subframe, i.e., input signal S(n+1). Preferably, Y(n) is stored in the last location of adaptive codebook 70, i.e., location p, thereby shifting the excitation vectors stored in previous locations forward and causing that vector stored in the first location to be discarded. Upon completion of step S1090, control passes back to step S1010 wherein the entire process of FIGS. 3(a)-3(b) is performed on a subsequent input subframe S(n+1). 
     Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details, representative devices, and illustrative examples shown and described. Accordingly, departures may be made from such details without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents.