Abstract:
In a speech signal decoding method, information containing at least a sound source signal, gain, and filter coefficients is decoded from a received bit stream. Voiced speech and unvoiced speech of a speech signal are identified using the decoded information. Smoothing processing based on the decoded information is performed for at least either one of the decoded gain and decoded filter coefficients in the unvoiced speech. The speech signal is decoded by driving a filter having the decoded filter coefficients by an excitation signal obtained by multiplying the decoded sound source signal by the decoded gain using the result of the smoothing processing. A speech signal decoding apparatus is also disclosed.

Description:
CROSS-REFERENCE TO RELATED PATENT APPLICATIONS 
       [0001]    This application is a continuation of application Ser. No. 11/335,739, filed Jan. 20, 2006, now pending, which is a continuation of application Ser. No. 09/627,421, filed Jul. 27, 2000, now U.S. Pat. No. 7,050,968, issued May 23, 2006, and based on Japanese Patent Application No. 11-214292, filed Jul. 28, 1999, by Atsushi Murashima. This application claims only subject matter disclosed in the parent applications and therefore presents no new matter. 
     
    
     BACKGROUND OF THE INVENTION 
       [0002]    The present invention relates to encoding and decoding apparatuses for transmitting a speech signal at a low bit rate and, more particularly, to a speech signal decoding method and apparatus for improving the quality of unvoiced speech. 
         [0003]    As a popular method of encoding a speech signal at low and middle bit rates with high efficiency, a speech signal is divided into a signal for a linear predictive filter and its driving sound source signal (sound source signal). One of the typical methods is CELP (Code Excited Linear Prediction). CELP obtains a synthesized speech signal (reconstructed signal) by driving a linear prediction filter having a linear prediction coefficient representing the frequency characteristics of input speech by an excitation signal given by the sum of a pitch signal representing the pitch period of speech and a sound source signal made up of a random number and a pulse. CELP is described in M. Schroeder et al., “Code-excited linear prediction: High-quality speech at very low bit rates,” Proc. of IEEE Int. Conf. on Acoust., Speech and Signal Processing, pp. 937-940, 1985 (reference 1). 
         [0004]    Mobile communications such as portable phones require high speech communication quality in noise environments represented by a crowded street of a city and a driving automobile. Speech coding based on the above-mentioned CELP suffers deterioration in the quality of speech (background noise speech) on which noise is superposed. To improve the encoding quality of background noise speech, the gain of a sound source signal is smoothed in the decoder. 
         [0005]    A method of smoothing the gain of a sound source signal is described in “Digital Cellular Telecommunication System; Adaptive Multi-Rate Speech Transcoding,” ETSI Technical Report, GSM 06.90 version 2.0.0, January 1999 (reference 2). 
         [0006]      FIG. 4  shows an example of a conventional speech signal decoding apparatus for improving the coding quality of background noise speech by smoothing the gain of a sound source signal. A bit stream is input at a period (frame) of T fr  msec (e.g., 20 msec), and a reconstructed vector is calculated at a period (subframe) of T fr /N sfr  msec (e.g., 5 msec) for an integer N sfr (e.g., 4). The frame length is given by L fr  samples (e.g., 320 samples), and the subframe length is given by L sfr  samples (e.g., 80 samples). These numbers of samples are determined by the sampling frequency (e.g., 16 kHz) of an input signal. Each block will be described. 
         [0007]    The code of a bit stream is input from an input terminal  10 . A code input circuit  1010  segments the code of the bit stream input from the input terminal  10  into several segments, and converts them into indices corresponding to a plurality of decoding parameters. The code input circuit  1010  outputs an index corresponding to LSP (Linear Spectrum Pair) representing the frequency characteristics of the input signal to an LSP decoding circuit  1020 . The circuit  1010  outputs an index corresponding to a delay L pd  representing the pitch period of the input signal to a pitch signal decoding circuit  1210 , and an index corresponding to a sound source vector made up of a random number and a pulse to a sound source signal decoding circuit  1110 . The circuit  1010  outputs an index corresponding to the first gain to a first gain decoding circuit  1220 , and an index corresponding to the second gain to a second gain decoding circuit  1120 . 
         [0008]    The LSP decoding circuit  1020  has a table which stores a plurality of sets of LSPs. The LSP decoding circuit  1020  receives the index output from the code input circuit  1010 , reads an LSP corresponding to the index from the table, and sets the LSP as LSp {circumflex over (q)}   j   (N     sfr     ) (n), j=1,Λ,N p  in the N sfr  th subframe of the current frame (nth frame). N p  is a linear prediction order. The LSPs of the first to (N sfr −1)th subframes are obtained by linearly interpolating {circumflex over (q)} j   (N     sfr     ) (n) and {circumflex over (q)} j   (N     sfr     ) (n−1). LSP{circumflex over (q)} j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr  are output to a linear prediction coefficient conversion circuit  1030  and smoothing coefficient calculation circuit  1310 . 
         [0009]    The linear prediction coefficient conversion circuit  1030  receives LSP{circumflex over (q)} j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr  output from the LSP decoding circuit  1020 . The linear prediction coefficient conversion circuit  1030  converts the received {circumflex over (q)} j   (m) (n) into a linear prediction coefficient {circumflex over (α)} j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr , and outputs {circumflex over (α)} j   (m) (n) to a synthesis filter  1040 . Conversion of the LSP into the linear prediction coefficient can adopt a known method, e.g., a method described in Section 5.2.4 of reference 2. 
         [0010]    The sound source signal decoding circuit  1110  has a table which stores a plurality of sound source vectors. The sound source signal decoding circuit  1110  receives the index output from the code input circuit  1010 , reads a sound source vector corresponding to the index from the table, and outputs the vector to a second gain circuit  1130 . 
         [0011]    The second gain decoding circuit  1120  has a table which stores a plurality of gains. The second gain decoding circuit  1120  receives the index output from the code input circuit  1010 , reads a second gain corresponding to the index from the table, and outputs the second gain to a smoothing circuit  1320 . 
         [0012]    The second gain circuit  1130  receives the first sound source vector output from the sound source signal decoding circuit  1110  and the second gain output from the smoothing circuit  1320 , multiplies the first sound source vector and the second gain to decode a second sound source vector, and outputs the decoded second sound source vector to an adder  1050 . 
         [0013]    A storage circuit  1240  receives and holds an excitation vector from the adder  1050 . The storage circuit  1240  outputs an excitation vector which was input and has been held to the pitch signal decoding circuit  1210 . 
         [0014]    The pitch signal decoding circuit  1210  receives the past excitation vector held by the storage circuit  1240  and the index output from the code input circuit  1010 . The index designates the delay L pd . The pitch signal decoding circuit  1210  extracts a vector for L sfr  samples corresponding to the vector length from the start point of the current frame to a past point by L pd  samples in the past excitation vector. Then, the circuit  1210  decodes a first pitch signal (vector). For L pd &lt;L sfr , the circuit  1210  extracts a vector for L pd  samples, and repetitively couples the extracted L pd  samples to decode the first pitch vector having a vector length of L sfr  samples. The pitch signal decoding circuit  1210  outputs the first pitch vector to a first gain circuit  1230 . 
         [0015]    The first gain decoding circuit  1220  has a table which stores a plurality of gains. The first gain decoding circuit  1220  receives the index output from the code input circuit  1010 , reads a first gain corresponding to the index, and outputs the first gain to the first gain circuit  1230 . 
         [0016]    The first gain circuit  1230  receives the first pitch vector output from the pitch signal decoding circuit  1210  and the first gain output from the first gain decoding circuit  1220 , multiplies the first pitch vector and the first gain to generate a second pitch vector, and outputs the generated second pitch vector to the adder  1050 . 
         [0017]    The adder  1050  receives the second pitch vector output from the first gain circuit  1230  and the second sound source vector output from the second gain circuit  1130 , adds them, and outputs the sum as an excitation vector to the synthesis filter  1040 . 
         [0018]    The smoothing coefficient calculation circuit  1310  receives LSP{circumflex over (q)} j   (m) (n) output from the LSP decoding circuit  1020 , and calculates an average LSP  q   0j (n): 
         [0000]          q     0j ( n )=0.84·   q     0j ( n− 1)+0.16· {circumflex over (q)}   j   (N     sfr     ) ( n ) 
         [0019]    The smoothing coefficient calculation circuit  1310  calculates an LSP variation amount d 0 (m) for each subframe m: 
         [0000]    
       
         
           
             
               
                 d 
                 0 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   j 
                   = 
                   1 
                 
                 
                   N 
                   p 
                 
               
                
               
                   
               
                
               
                 
                    
                   
                     
                       
                         
                           q 
                           _ 
                         
                         
                           0 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         n 
                         ) 
                       
                     
                     - 
                     
                       
                         
                           q 
                           ^ 
                         
                         j 
                         
                           ( 
                           m 
                           ) 
                         
                       
                        
                       
                         ( 
                         n 
                         ) 
                       
                     
                   
                    
                 
                 
                   
                     
                       q 
                       _ 
                     
                     
                       0 
                        
                       j 
                     
                   
                    
                   
                     ( 
                     n 
                     ) 
                   
                 
               
             
           
         
       
     
         [0020]    The smoothing coefficient calculation circuit  1310  calculates a smoothing coefficient k 0 (m) of the subframe m: 
         [0000]        k   0 ( m )=min(0.25,max(θ, d   0 ( m )−0.4))/0.25 
         [0000]    where min(x,y) is a function using a smaller one of x and y, and max(x,y) is a function using a larger one of x and y. The smoothing coefficient calculation circuit  1310  outputs the smoothing coefficient k 0 (m) to the smoothing circuit  1320 . 
         [0021]    The smoothing circuit  1320  receives the smoothing coefficient k 0 (m) output from the smoothing coefficient calculation circuit  1310  and the second gain output from the second gain decoding circuit  1120 . The smoothing circuit  1320  calculates an average gain  g   0 (m) from a second gain ĝ 0 (m) of the subframe m by 
         [0000]    
       
         
           
             
               
                 
                   g 
                   _ 
                 
                 0 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 1 
                 5 
               
                
               
                 
                   ∑ 
                   
                     i 
                     = 
                     0 
                   
                   4 
                 
                  
                 
                   
                     
                       g 
                       ^ 
                     
                     0 
                   
                    
                   
                     ( 
                     
                       m 
                       - 
                       i 
                     
                     ) 
                   
                 
               
             
           
         
       
     
         [0022]    The second gain ĝ 0 (m) is replaced by 
         [0000]        ĝ   0 ( m )= ĝ   0 ( m )· k   0 ( m )+   g     0 ( m )·(1 −k   0 ( m )) 
         [0023]    The smoothing circuit  1320  outputs the second gain ĝ 0 (m) to the second gain circuit  1130 . 
         [0024]    The synthesis filter  1040  receives the excitation vector output from the adder  1050  and a linear prediction coefficient α i , i=1,Λ,N p  output from the linear prediction coefficient conversion circuit  1030 . The synthesis filter  1040  calculates a reconstructed vector by driving the synthesis filter 1/A(z) in which the linear prediction coefficient is set, by the excitation vector. Then, the synthesis filter  1040  outputs the reconstructed vector from an output terminal  20 . Letting α i , i=1,Λ,N p  be the linear prediction coefficient, the transfer function 1/A(z) of the synthesis filter is given by 
         [0000]    
       
         
           
             
               1 
               
                 
                   ( 
                   A 
                   ) 
                 
                  
                 z 
               
             
             = 
             
               1 
               
                 ( 
                 
                   1 
                   - 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       
                         N 
                         p 
                       
                     
                      
                     
                       
                         α 
                         i 
                       
                        
                       
                         z 
                         i 
                       
                     
                   
                 
                 ) 
               
             
           
         
       
     
         [0025]      FIG. 5  shows the arrangement of a speech signal encoding apparatus in a conventional speech signal encoding/decoding apparatus. A first gain circuit  1230 , second gain circuit  1130 , adder  1050 , and storage circuit  1240  are the same as the blocks described in the conventional speech signal decoding apparatus in  FIG. 4 , and a description thereof will be omitted. 
         [0026]    An input signal (input vector) generated by sampling a speech signal and combining a plurality of samples as one frame into one vector is input from an input terminal  30 . A linear prediction coefficient calculation circuit  5510  receives the input vector from the input terminal  30 . The linear prediction coefficient calculation circuit  5510  performs linear prediction analysis for the input vector to obtain a linear prediction coefficient. Linear prediction analysis is described in Chapter 8 “Linear Predictive Coding of Speech” of reference 4. 
         [0027]    The linear prediction coefficient calculation circuit  5510  outputs the linear prediction coefficient to an LSP conversion/quantization circuit  5520 . 
         [0028]    The LSP conversion/quantization circuit  5520  receives the linear prediction coefficient output from the linear prediction coefficient calculation circuit  5510 , converts the linear prediction coefficient into LSP, and quantizes the LSP to attain the quantized LSP. Conversion of the linear prediction coefficient into the LSP can adopt a known method, e.g., a method described in Section 5.2.4 of reference 2. 
         [0029]    Quantization of the LSP can adopt a method described in Section 5.2.5 of reference 2. As described in the LSP decoding circuit of  FIG. 4  (prior art), the quantized LSP is the quantized LSP{circumflex over (q)} j   (N     sfr     ) (n), j=1,Λ,N p  in the N sfr  subframe of the current frame (nth frame). The quantized LSPs of the first to (N sfr −1)th subframes are obtained by linearly interpolating {circumflex over (q)} j   (N     sfr     ) (n) and {circumflex over (q)} j   (N     sfr     ) (n−1). The LSP is LSPq j   (N     sfr     ) (n), j=1,Λ,N p  in the N sfr  subframe of the current frame (nth frame). The LSPs of the first to (N sfr −1)th subframes are obtained by linearly interpolating q j   (N     sfr     ) (n) and q j   (N     sfr     ) (n−1). 
         [0030]    The LSP conversion/quantization circuit  5520  outputs the LSPq j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr , and the quantized LSP{circumflex over (q)} j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr  to a linear prediction coefficient conversion circuit  5030 , and an index corresponding to the quantized LSP{circumflex over (q)} j   (N     sfr     ) (n), j=1,Λ,N p  to a code output circuit  6010 . 
         [0031]    The linear prediction coefficient conversion circuit  5030  receives the LSPq j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr , and the quantized LSP{circumflex over (q)} j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr  output from the LSP conversion/quantization circuit  5520 . The circuit  5030  converts q j   (m) (n) into a linear prediction coefficient α j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr , and {circumflex over (q)} j   (m) (n) into a quantized linear prediction coefficient α j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr . The linear prediction coefficient conversion circuit  5030  outputs the α j   (m) (n) to the weighting filter  5050  and weighting synthesis filter  5040 , and α j   (m) (n) to the weighting synthesis filter  5040 . Conversion of the LSP into the linear prediction coefficient and conversion of the quantized LSP into the quantized linear prediction coefficient can adopt a known method, e.g., a method described in Section 5.2.4 of reference 2. 
         [0032]    The weighting filter  5050  receives the input vector from the input terminal  30  and the linear prediction coefficient output from the linear prediction coefficient conversion circuit  5030 , and generates a weighting filter W(z) corresponding to the human sense of hearing using the linear prediction coefficient. The weighting filter is driven by the input vector to obtain a weighted input vector. The weighting filter  5050  outputs the weighted input vector to a subtractor  5060 . The transfer function W(z) of the weighting filter  5050  is given by W(z)=Q(z/γ 1 )/Q(z/γ 2 ). Note that 
         [0000]    
       
         
           
             
               Q 
                
               
                 ( 
                 
                   z 
                   
                     γ 
                     1 
                   
                 
                 ) 
               
             
             = 
             
               1 
               - 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   
                     N 
                     p 
                   
                 
                  
                 
                   
                     α 
                     i 
                     
                       ( 
                       m 
                       ) 
                     
                   
                    
                   
                     γ 
                     1 
                     i 
                   
                    
                   
                     z 
                     i 
                   
                    
                   
                       
                   
                    
                   and 
                 
               
             
           
         
       
       
         
           
             
               Q 
                
               
                 ( 
                 
                   z 
                   
                     γ 
                     2 
                   
                 
                 ) 
               
             
             = 
             
               1 
               - 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   
                     N 
                     p 
                   
                 
                  
                 
                   
                     α 
                     i 
                     
                       ( 
                       m 
                       ) 
                     
                   
                    
                   
                     γ 
                     2 
                     i 
                   
                    
                   
                     z 
                     i 
                   
                 
               
             
           
         
       
     
         [0000]    where γ 1  and γ 2  are constants, e.g., γ 1 =0.9 and γ 2 =0.6. Details of the weighting filter are described in reference 1. 
         [0033]    The weighting synthesis filter  5040  receives the excitation vector output from the adder  1050 , and the linear prediction coefficient α j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr , and the quantized linear prediction coefficient {circumflex over (α)} j   (m) (n), j=1,Λ,N p , m=1,Λ,N sfr  that are output from the linear prediction coefficient conversion circuit  5030 . A weighting synthesis filter H(z)W(z)=Q(z/γ 1 )/[A(z)Q(z/γ 2 )] having α j   (m) (n) and {circumflex over (α)} j   (m) (n) is driven by the excitation vector to obtain a weighted reconstructed vector. The transfer function H(z)=1/A(z) of the synthesis filter is given by 
         [0000]    
       
         
           
             
               1 
               
                 A 
                  
                 
                   ( 
                   z 
                   ) 
                 
               
             
             = 
             
               
                 1 
                 
                   ( 
                   
                     1 
                     - 
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         
                           N 
                           p 
                         
                       
                        
                       
                         
                           
                             α 
                             ^ 
                           
                           i 
                           
                             ( 
                             m 
                             ) 
                           
                         
                          
                         
                           z 
                           i 
                         
                       
                     
                   
                   ) 
                 
               
               . 
             
           
         
       
     
         [0034]    The subtractor  5060  receives the weighted input vector output from the weighting filter  5050  and the weighted reconstructed vector output from the weighting synthesis filter  5040 , calculates their difference, and outputs it as a difference vector to a minimizing circuit  5070 . 
         [0035]    The minimizing circuit  5070  sequentially outputs all indices corresponding to sound source vectors stored in a sound source signal generation circuit  5110  to the sound source signal generation circuit  5110 . The minimizing circuit  5070  sequentially outputs indices corresponding to all delays L pd  within a range defined by a pitch signal generation circuit  5210  to the pitch signal generation circuit  5210 . The minimizing circuit  5070  sequentially outputs indices corresponding to all first gains stored in a first gain generation circuit  6220  to the first gain generation circuit  6220 , and indices corresponding to all second gains stored in a second gain generation circuit  6120  to the second gain generation circuit  6120 . 
         [0036]    The minimizing circuit  5070  sequentially receives difference vectors output from the subtractor  5060 , calculates their norms, selects a sound source vector, delay L pd , and first and second gains that minimize the norm, and outputs corresponding indices to the code output circuit  6010 . The pitch signal generation circuit  5210 , sound source signal generation circuit  5110 , first gain generation circuit  6220 , and second gain generation circuit  6120  sequentially receive indices output from the minimizing circuit  5070 . 
         [0037]    The pitch signal generation circuit  5210 , sound source signal generation circuit  5110 , first gain generation circuit  6220 , and second gain generation circuit  6120  are the same as the pitch signal decoding circuit  1210 , sound source signal decoding circuit  1110 , first gain decoding circuit  1220 , and second gain decoding circuit  1120  in  FIG. 4  except for input/output connections, and a detailed description of these blocks will be omitted. 
         [0038]    The code output circuit  6010  receives an index corresponding to the quantized LSP output from the LSP conversion/quantization circuit  5520 , and indices corresponding to the sound source vector, delay L pd , and first and second gains that are output from the minimizing circuit  5070 . The code output circuit  6010  converts these indices into a bit stream code, and outputs it via an output terminal  40 . 
         [0039]    The first problem is that sound different from normal voiced speech is generated in short unvoiced speech intermittently contained in the voiced speech or part of the voiced speech. As a result, discontinuous sound is generated in the voiced speech. This is because the LSP variation amount d 0 (m) decreases in the short unvoiced speech to increase the smoothing coefficient. Since d 0 (m) greatly varies over time, d 0 (m) exhibits a large value to a certain degree in part of the voiced speech, but the smoothing coefficient does not become 0. 
         [0040]    The second problem is that the smoothing coefficient abruptly changes in unvoiced speech. As a result, discontinuous sound is generated in the unvoiced speech. This is because the smoothing coefficient is determined using d 0 (m) which greatly varies over time. 
         [0041]    The third problem is that proper smoothing processing corresponding to the type of background noise cannot be selected. As a result, the decoding quality degrades. This is because the decoding parameter is smoothed based on a single algorithm using only different set parameters. 
       SUMMARY OF THE INVENTION 
       [0042]    It is an object of the present invention to provide a speech signal decoding method and apparatus for improving the quality of reconstructed speech against background noise speech. 
         [0043]    To achieve the above object, according to the present invention, there is provided a speech signal decoding method comprising the steps of decoding information containing at least a sound source signal, a gain, and filter coefficients from a received bit stream, identifying voiced speech and unvoiced speech of a speech signal using the decoded information, performing smoothing processing based on the decoded information for at least either one of the decoded gain and the decoded filter coefficients in the unvoiced speech, and decoding the speech signal by driving a filter having the decoded filter coefficients by an excitation signal obtained by multiplying the decoded sound source signal by the decoded gain using a result of the smoothing processing. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0044]      FIG. 1  is a block diagram showing a speech signal decoding apparatus according to the first embodiment of the present invention; 
           [0045]      FIG. 2  is a block diagram showing a speech signal decoding apparatus according to the second embodiment of the present invention; 
           [0046]      FIG. 3  is a block diagram showing a speech signal encoding apparatus used in the present invention; 
           [0047]      FIG. 4  is a block diagram showing a conventional speech signal decoding apparatus; and 
           [0048]      FIG. 5  is a block diagram showing a conventional speech signal encoding apparatus. 
       
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0049]    The present invention will be described in detail below with reference to the accompanying drawings. 
         [0050]      FIG. 1  shows a speech signal decoding apparatus according to the first embodiment of the present invention. An input terminal  10 , output terminal  20 , LSP decoding circuit  1020 , linear prediction coefficient conversion circuit  1030 , sound source signal decoding circuit  1110 , storage circuit  1240 , pitch signal decoding circuit  1210 , first gain circuit  1230 , second gain circuit  1130 , adder  1050 , and synthesis filter  1040  are the same as the blocks described in the prior art of  FIG. 4 , and a description thereof will be omitted. 
         [0051]    A code input circuit  1010 , voiced/unvoiced identification circuit  2020 , noise classification circuit  2030 , first switching circuit  2110 , second switching circuit  2210 , first filter  2150 , second filter  2160 , third filter  2170 , fourth filter  2250 , fifth filter  2260 , sixth filter  2270 , first gain decoding circuit  2220 , and second gain decoding circuit  2120  will be described. 
         [0052]    A bit stream is input at a period (frame) of T fr  msec (e.g., 20 msec), and a reconstructed vector is calculated at a period (subframe) of T fr /N sfr  msec (e.g., 5 msec) for an integer N sfr (e.g., 4). The frame length is given by L fr  samples (e.g., 320 samples), and the subframe length is given by L sfr  samples (e.g., 80 samples). These numbers of samples are determined by the sampling frequency (e.g., 16 kHz) of an input signal. Each block will be described. 
         [0053]    The code input circuit  1010  segments the code of a bit stream input from an input terminal  10  into several segments, and converts them into indices corresponding to a plurality of decoding parameters. The code input circuit  1010  outputs an index corresponding to LSP to the LSP decoding circuit  1020 . The circuit  1010  outputs an index corresponding to a speech mode to a speech mode decoding circuit  2050 , an index corresponding to a frame energy to a frame power decoding circuit  2040 , an index corresponding to a delay L pd  to the pitch signal decoding circuit  1210 , and an index corresponding to a sound source vector to the sound source signal decoding circuit  1110 . The circuit  1010  outputs an index corresponding to the first gain to the first gain decoding circuit  2220 , and an index corresponding to the second gain to the second gain decoding circuit  2120 . 
         [0054]    The speech mode decoding circuit  2050  receives the index corresponding to the speech mode that is output from the code input circuit  1010 , and sets a speech mode S mode  corresponding to the index. The speech mode is determined by threshold processing for an intra-frame average  G   op (n) of an open-loop pitch prediction gain G op (m) calculated using a perceptually weighted input signal in a speech encoder. The speech mode is transmitted to the decoder. In this case, n represents the frame number; and m, the subframe number. Determination of the speech mode is described in K. Ozawa et al., “M-LCELP Speech Coding at 4 kb/s with Multi-Mode and Multi-Codebook,” IEICE Trans. On Commun., Vol. E77-B, No. 9, pp. 1114-1121, September 1994 (reference 3). 
         [0055]    The speech mode decoding circuit  2050  outputs the speech mode S mode  to the voiced/unvoiced identification circuit  2020 , first gain decoding circuit  2220 , and second gain decoding circuit  2120 . 
         [0056]    The frame power decoding circuit  2040  has a table  2040   a  which stores a plurality of frame energies. The frame power decoding circuit  2040  receives the index corresponding to the frame power that is output from the code input circuit  1010 , and reads a frame power Ê rms  corresponding to the index from the table  2040   a . The frame power is attained by quantizing the power of an input signal in the speech encoder, and an index corresponding to the quantized value is transmitted to the decoder. The frame power decoding circuit  2040  outputs the frame power Ê rms  to the voiced/unvoiced identification circuit  2020 , first gain decoding circuit  2220 , and second gain decoding circuit  2120 . 
         [0057]    The voiced/unvoiced identification circuit  2020  receives LSP{circumflex over (q)} j   (m) (n) output from the LSP decoding circuit  1020 , the speech mode S mode  output from the speech mode decoding circuit  2050 , and the frame power Ê rms  output from the frame power decoding circuit  2040 . The sequence of obtaining the variation amount of a spectral parameter will be explained. 
         [0058]    As the spectral parameter, LSP{circumflex over (q)} j   (m) (n) is used. In the nth frame, a long-term average  q   j (n) of the LSP is calculated by 
         [0000]          q     j ( n )=β 0   ·  q     j ( n− 1)+(1β 0 )· {circumflex over (q)}   j   (N     sfr     ) ( n ), j= 1 ,Λ,N   p    
         [0000]    where β 0 =0.9. 
         [0059]    A variation amount d q (n) of the LSP in the nth frame is defined by 
         [0000]    
       
         
           
             
               
                 d 
                 q 
               
                
               
                 ( 
                 n 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   j 
                   = 
                   1 
                 
                 
                   N 
                   p 
                 
               
                
               
                 
                   ∑ 
                   
                     m 
                     = 
                     1 
                   
                   
                     N 
                     sfr 
                   
                 
                  
                 
                     
                 
                  
                 
                   
                     
                       D 
                       
                         q 
                         , 
                         j 
                       
                       
                         ( 
                         m 
                         ) 
                       
                     
                      
                     
                       ( 
                       n 
                       ) 
                     
                   
                   
                     
                       
                         q 
                         _ 
                       
                       j 
                     
                      
                     
                       ( 
                       n 
                       ) 
                     
                   
                 
               
             
           
         
       
     
         [0000]    where D q,j   (m) (n) corresponds to the distance between  q   j (n) and {circumflex over (q)} j   (m) (n). For example, 
         [0000]        D   q,j   (m) ( n )=(   q     j ( n )− {circumflex over (q)}   j   (m) ( n )) 2    
         [0000]      or 
         [0000]        D   q,j   (m) ( n )=|   q     j ( n )− {circumflex over (q)}   j   (m) ( n )| 
         [0060]    In this case, D q,j   (m) (n)=|  q   j (n)−{circumflex over (q)} j   (m) (n)| is employed. 
         [0061]    A section where the variation amount d q (n) is large substantially corresponds to voiced speech, whereas a section where the variation amount d q (n) is small substantially corresponds to unvoiced speech. However, the variation amount d q (n) greatly varies over time, and the range of d q (n) in voiced speech and that in unvoiced speech overlap each other. Thus, a threshold for identifying voiced speech and unvoiced speech is difficult to set. 
         [0062]    For this reason, the long-term average of d q (n) is used to identify voiced speech and unvoiced speech. A long-term average  d   q1 (n) of d q (n) is calculated using a linear or non-linear filter. As  d   q1 (n), the average, median, or mode of d q (n) can be applied. In this case, 
         [0000]          d     q1 ( n )=β 1   ·  d     q1 ( n− 1)+(1−β 1 )· d   q ( n ) 
         [0000]    is used where β 1 =0.9. 
         [0063]    Threshold processing for  d   q1 (n) determines an identification flag S vs : 
         [0000]      if (   d     q1 ( n )≧ C   th1 ) then  S   vs =1 
         [0000]      else S vs =0 
         [0000]    where C th1  is a given constant (e.g., 2.2), S vs =1 corresponds to voiced speech, and S vs =0 corresponds to unvoiced speech. 
         [0064]    Even voiced speech may be mistaken for unvoiced speech in a section where steadiness is high because d q (n) is small. To avoid this, a section where the frame power and pitch prediction gain are large is regarded as voiced speech. For S vs =0, S vs  is corrected by the following additional determination: 
         [0000]      if ( Ê   rms   ≧C   rms  and  S   mode ≧2) then  S   vs =1 
         [0000]      else S vs =0 
         [0000]    where C rms  is a given constant (e.g., 10,000), and S mode ≧2 corresponds to an intra-frame average  G   op (n) of 3.5 dB or more for the pitch prediction gain. 
         [0065]    This is defined by the encoder. 
         [0066]    The voiced/unvoiced identification circuit  2020  outputs S vs  to the noise classification circuit  2030 , first switching circuit  2110 , and second switching circuit  2210 , and  d   q1 (n) to the noise classification circuit  2030 . 
         [0067]    The noise classification circuit  2030  receives  d   q1 (n) and S vs  that are output from the voiced/unvoiced identification circuit  2020 . In unvoiced speech (noise), a value  d   q2 (n) which reflects the average behavior of  d   q1 (n) is obtained using a linear or non-linear filter. 
         [0068]    For S vs =0, 
         [0000]          d     q2 ( n )=β 2   ·  d     q2 ( n− 1)+(1−β 2 )·   d     q1 ( n ) 
         [0000]    is calculated for β2=0.94. 
         [0069]    Threshold processing for  d   q2 (n) classifies noise to determine a classification flag S nz : 
         [0000]      if (   d     q2 ( n )≧ C   th2 ) then  S   nz =1 
         [0000]      else S nz =0 
         [0000]    where C th2  is a given constant (e.g., 1.7), S nz =1 corresponds to noise whose frequency characteristics unsteadily change over time, and S nz =0 corresponds to noise whose frequency characteristics steadily change over time. The noise classification circuit  2030  outputs S nz  to the first and second switching circuits  2110  and  2210 . 
         [0070]    The first switching circuit  2110  receives LSP{circumflex over (q)} j   (m) (n) output from the LSP decoding circuit  1020 , the identification flag S vs  output from the voiced/unvoiced identification circuit  2020 , and the classification flag S nz  output from the noise classification circuit  2030 . The first switching circuit  2110  is switched in accordance with the identification and classification flag values to output LSP{circumflex over (q)} j   (m) (n) to the first filter  2150  for S vs =0 and S nz =0, to the second filter  2160  for S vs =0 and S nz =1, and to the third filter  2170  for S vs =1. 
         [0071]    The first filter  2150  receives LSP{circumflex over (q)} j   (m) (n) output from the first switching circuit  2110 , smoothes it using a linear or non-linear filter, and outputs it as a first smoothed LsP  q   1,j   (m-1) (n) to the linear prediction coefficient conversion circuit  1030 . In this case, the first filter  2150  uses a filter given by 
         [0000]          q     1,j   (m) ( n )=γ 1 ·  q   1,j   (m-1) ( n )+(1−γ 1 )· {circumflex over (q)}   j   (m) ( n ), j= 1 ,Λ,N   p    
         [0000]    where  q   1,j   (0) ( n )=   q     1,j   (N     sfr   )( n− 1), and γ 1 =0.5. 
         [0072]    The second filter  2160  receives LSP{circumflex over (q)} j   (m) (n) output from the first switching circuit  2110 , smoothes it using a linear or non-linear filter, and outputs it as a second smoothed LSP  q   2,j   (m) (n) to the linear prediction coefficient conversion circuit  1030 . In this case, the second filter  2160  uses a filter given by 
         [0000]          q     2,j   (m) ( n )=γ 2   ·  q     2,j   (m-1) ( n )+(1=γ 2 )· {circumflex over (q)}   j   (m) ( n ), j= 1 ,Λ,N   p    
         [0000]    where  q   2,j   (0) (n)=  q   2,j   (N     sfr     ) (n−1), and γ 1 =0.0. 
         [0073]    The third filter  2170  receives LSP{circumflex over (q)} j   (m) (n) output from the first switching circuit  2110 , smoothes it using a linear or non-linear filter, and outputs it as a third smoothed LSP  q   3,j   (m) (n) to the linear prediction coefficient conversion circuit  1030 . In this case,  q   3,j   (m) (n)={circumflex over (q)} j   (m) (n). 
         [0074]    The second switching circuit  2210  receives the second gain ĝ 1   (m) (n) output from the second gain decoding circuit  2120 , the identification flag S vs  output from the voiced/unvoiced identification circuit  2020 , and the classification flag S nz  output from the noise classification circuit  2030 . The second switching circuit  2210  is switched in accordance with the identification and classification flag values to output the second gain ĝ 2   (m) (n) to the fourth filter  2250  for S vs =0 and S nz =0, to the fifth filter  2260  for S vs =0 and S nz =1, and to the sixth filter  2270  for S vs =1. 
         [0075]    The fourth filter  2250  receives the second gain ĝ 2   (m )(n) output from the second switching circuit  2210 , smoothes it using a linear or non-linear filter, and outputs it as a first smoothed gain  g   2,1   (m) (n) to the second gain circuit  1130 . In this case, the fourth filter  2250  uses a filter given by 
         [0000]          g     2,1   (m) ( n )=γ 2   ·  g     2,1   (m-1) ( n )+(1=γ 2 )· ĝ   2   (m) ( n ) 
         [0000]    where  g   2,1   (0) (n)=  q   2,1   (N     sfr     ) (n−1), and γ 1 =0.9. 
         [0076]    The fifth filter  2260  receives the second gain ĝ 2   (m) (n) output from the second switching circuit  2210 , smoothes it using a linear or non-linear filter, and outputs it as a second smoothed gain  g   2,2   (m) (n) to the second gain circuit  1130 . In this case, the fifth filter  2260  uses a filter given by 
         [0000]          g     2,2   (m) ( n )=γ 2   ·  g     2,2   (m-1) ( n )+(1=γ 2 )· ĝ   2   (m) ( n ) 
         [0000]    where  g   2,2   (0) (n)=  q   2,2   (N     sfr     ) (n−1), and γ 1 =0.9. 
         [0077]    The sixth filter  2270  receives the second gain ĝ 2   (m) (n) output from the second switching circuit  2210 , smoothes it using a linear or non-linear filter, and outputs it as a third smoothed gain  g   2,3   (m) (n) to the second gain circuit  1130 . In this case,  g   2,3   (m) (n)=ĝ 2   (m) (n). 
         [0078]    The first gain decoding circuit  2220  has a table  2220   a  which stores a plurality of gains. The first gain decoding circuit  2220  receives an index corresponding to the third gain output from the code input circuit  1010 , the speech mode S mode  output from the speech mode decoding circuit  2050 , the frame power Ê rms  output from the frame power decoding circuit  2040 , the linear prediction coefficient {circumflex over (α)} j   (m) (n), j=1,Λ,N p  of the mth subframe of the nth frame output from the linear prediction coefficient conversion circuit  1030 , and a pitch vector c ac (i), i=1,Λ,L sfr  output from the pitch signal decoding circuit  1210 . 
         [0079]    The first gain decoding circuit  2220  calculates a k parameter k j   (m) (n), j=1,Λ,N p  (to be simply represented as k j ) from the linear prediction coefficient {circumflex over (α)} j   (m) (n). This is calculated by a known method, e.g., a method described in Section 8.3.2 in L. R. Rabiner et al., “Digital Processing of Speech Signals,” Prentice-Hall, 1978 (reference 4). Then, the first gain decoding circuit  2220  calculates an estimated residual power {tilde over (E)} res  using k j : 
         [0000]        {tilde over (E)}   res   =Ê   rms √{square root over (π j=1   N     p   (2 −k   j   2 ))} 
         [0080]    The first gain decoding circuit  2220  reads a third gain {circumflex over (γ)} gac  corresponding to the index from the table  2220   a  switched by the speech mode S mode , and calculates a first gain ĝ ac : 
         [0000]    
       
         
           
             
               
                 g 
                 ^ 
               
               
                 a 
                  
                 
                     
                 
                  
                 c 
               
             
             = 
             
               
                 
                   γ 
                   ^ 
                 
                 gac 
               
                
               
                 
                   
                     E 
                     ~ 
                   
                   res 
                 
                 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         0 
                       
                       
                         L 
                         
                           sfr 
                           
                             - 
                             1 
                           
                         
                       
                     
                      
                     
                       
                         c 
                         
                           a 
                            
                           
                               
                           
                            
                           c 
                         
                         2 
                       
                        
                       
                         ( 
                         i 
                         ) 
                       
                     
                   
                 
               
             
           
         
       
     
         [0081]    The first gain decoding circuit  2220  outputs the first gain ĝ ac  to the first gain circuit  1230 . The second gain decoding circuit  2120  has a table  2120   a  which stores a plurality of gains. 
         [0082]    The second gain decoding circuit  2120  receives an index corresponding to the fourth gain output from the code input circuit  1010 , the speech mode S mode  output from the speech mode decoding circuit  2050 , the frame power Ê rms  output from the frame power decoding circuit  2040 , the linear prediction coefficient {circumflex over (α)} j   (m) (n), j=1,Λ,N p  of the mth subframe of the nth frame output from the linear prediction coefficient conversion circuit  1030 , and a sound source vector c ec (i), i=1,Λ,L sfr  output from the sound source signal decoding circuit  1110 . 
         [0083]    The second gain decoding circuit  2120  calculates a k parameter k j   (m) (n), j=1,Λ,N p  (to be simply represented as k j ) from the linear prediction coefficient {circumflex over (α)} j   (m) (n). This is calculated by the same known method as described for the first gain decoding circuit  2220 . Then, the second gain decoding circuit  2120  calculates an estimated residual power {tilde over (E)} res  using k j : 
         [0000]        {tilde over (E)}   res   =Ê   rms √{square root over (π j=1   N     p   (2 −k   j   2 ))} 
         [0084]    The second gain decoding circuit  2120  reads a fourth gain {circumflex over (γ)} gec  corresponding to the index from the table  2120   a  switched by the speech mode S mode , and calculates a second gain ĝ ec : 
         [0000]    
       
         
           
             
               
                 g 
                 ^ 
               
               ec 
             
             = 
             
               
                 
                   γ 
                   ^ 
                 
                 gec 
               
                
               
                 
                   
                     E 
                     ~ 
                   
                   res 
                 
                 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         0 
                       
                       
                         L 
                         
                           sfr 
                           
                             - 
                             1 
                           
                         
                       
                     
                      
                     
                       
                         c 
                         ec 
                         2 
                       
                        
                       
                         ( 
                         i 
                         ) 
                       
                     
                   
                 
               
             
           
         
       
     
         [0085]    The second gain decoding circuit  2120  outputs the second gain ĝ ec  to the second switching circuit  2210 . 
         [0086]      FIG. 2  shows a speech signal decoding apparatus according to the second embodiment of the present invention. 
         [0087]    This speech signal decoding apparatus of the present invention is implemented by replacing the frame power decoding circuit  2040  in the first embodiment with a power calculation circuit  3040 , the speech mode decoding circuit  2050  with a speech mode determination circuit  3050 , the first gain decoding circuit  2220  with a first gain decoding circuit  1220 , and the second gain decoding circuit  2120  with second gain decoding circuit  1120 . In this arrangement, the frame power and speech mode are not encoded and transmitted in the encoder, and the frame power (power) and speech mode are obtained using parameters used in the decoder. 
         [0088]    The first and second gain decoding circuits  1220  and  1120  are the same as the blocks described in the prior art of  FIG. 4 , and a description thereof will be omitted. 
         [0089]    The power calculation circuit  3040  receives a reconstructed vector output from a synthesis filter  1040 , calculates a power from the sum of squares of the reconstructed vectors, and outputs the power to a voiced/unvoiced identification circuit  2020 . In this case, the power is calculated for each subframe. Calculation of the power in the mth subframe uses a reconstructed signal output from the synthesis filter  1040  in the (m−1)th subframe. For a reconstructed signal S syn (i), i=0,Λ,L sfr , the power E rms  is calculated by, e.g., RMS (Root Mean Square): 
         [0000]    
       
         
           
             
               E 
               rms 
             
             = 
             
               
                 
                   ∑ 
                   
                     i 
                     = 
                     0 
                   
                   
                     
                       L 
                       sfr 
                     
                     - 
                     1 
                   
                 
                  
                 
                   
                     s 
                     syn 
                     2 
                   
                    
                   
                     ( 
                     i 
                     ) 
                   
                 
               
             
           
         
       
     
         [0090]    The speech mode determination circuit  3050  receives a past excitation vector e mem (i), i=0,Λ,L mem −1 held by a storage circuit  1240 , and the index output from the code input circuit  1010 . The index designates a delay L pd . L mem  is a constant determined by the maximum value of L pd . 
         [0091]    In the mth subframe, a pitch prediction gain G emem (m), m=1,Λ,N sfr  is calculated from the past excitation vector e mem (i) and delay L pd : 
         [0000]        G   emem ( m )=10·log 10 ( g   emem ( m )) 
         [0000]    where 
         [0000]    
       
         
           
             
               
                 g 
                 emem 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               1 
               
                 1 
                 - 
                 
                   
                     
                       E 
                       c 
                       2 
                     
                      
                     
                       ( 
                       m 
                       ) 
                     
                   
                   
                     
                       
                         E 
                         
                           a 
                            
                           
                               
                           
                            
                           1 
                         
                       
                        
                       
                         ( 
                         m 
                         ) 
                       
                     
                      
                     
                       
                         E 
                         
                           a 
                            
                           
                               
                           
                            
                           2 
                         
                       
                        
                       
                         ( 
                         m 
                         ) 
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             
               
                 E 
                 
                   a 
                    
                   
                       
                   
                    
                   1 
                 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 
                   
                     L 
                     sfr 
                   
                   - 
                   1 
                 
               
                
               
                 
                   e 
                   mem 
                   2 
                 
                  
                 
                   ( 
                   i 
                   ) 
                 
               
             
           
         
       
       
         
           
             
               
                 E 
                 
                   a 
                    
                   
                       
                   
                    
                   2 
                 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 
                   
                     L 
                     sfr 
                   
                   - 
                   1 
                 
               
                
               
                 
                   e 
                   mem 
                   2 
                 
                  
                 
                   ( 
                   
                     i 
                     - 
                     
                       L 
                       pd 
                     
                   
                   ) 
                 
               
             
           
         
       
       
         
           
             
               
                 E 
                 c 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 
                   
                     L 
                     sfr 
                   
                   - 
                   1 
                 
               
                
               
                 
                   
                     e 
                     mem 
                   
                    
                   
                     ( 
                     i 
                     ) 
                   
                 
                  
                 
                   
                     e 
                     mem 
                   
                    
                   
                     ( 
                     
                       i 
                       - 
                       
                         L 
                         pd 
                       
                     
                     ) 
                   
                 
               
             
           
         
       
     
         [0092]    The pitch prediction gain G emem (m) or the intra-frame average  G   emem (n) in the nth frame of G emem (m) undergoes the following threshold processing to set a speech mode S mode : 
         [0000]      if (   G     emem ( n )≧3.5) then  S   mode =2 
         [0000]      else S mode =0 
         [0093]    The speech mode determination circuit  3050  outputs the speech mode S mode  to the voiced/unvoiced identification circuit  2020 . 
         [0094]      FIG. 3  shows a speech signal encoding apparatus used in the present invention. 
         [0095]    The speech signal encoding apparatus in  FIG. 3  is implemented by adding a frame power calculation circuit  5540  and speech mode determination circuit  5550  in the prior art of  FIG. 5 , replacing the first and second gain generation circuits  6220  and  6120  with first and second gain generation circuits  5220  and  5120 , and replacing the code output circuit  6010  with a code output circuit  5010 . The first and second gain generation circuits  5220  and  5120 , an adder  1050 , and a storage circuit  1240  are the same as the blocks described in the prior art of  FIG. 5 , and a description thereof will be omitted. 
         [0096]    The frame power calculation circuit  5540  has a table  5540   a  which stores a plurality of frame energies. The frame power calculation circuit  5540  receives an input vector from an input terminal  30 , calculates the RMS (Root Mean Square) of the input vector, and quantizes the RMS using the table to attain a quantized frame power Ê rms , For an input vector s i (i), i=0,Λ, L sfr , a power E irms  is given by 
         [0000]    
       
         
           
             
               E 
               irms 
             
             = 
             
               
                 
                   ∑ 
                   
                     i 
                     = 
                     0 
                   
                   
                     
                       L 
                       sfr 
                     
                     - 
                     1 
                   
                 
                  
                 
                   
                     s 
                     i 
                     2 
                   
                    
                   
                     ( 
                     i 
                     ) 
                   
                 
               
             
           
         
       
     
         [0097]    The frame power calculation circuit  5540  outputs the quantized frame power Ê rms  to the first and second gain generation circuits  5220  and  5120 , and an index corresponding to Ê rms  to the code output circuit  5010 . 
         [0098]    The speech mode determination circuit  5550  receives a weighted input vector output from a weighting filter  5050 . 
         [0099]    The speech mode S mode  is determined by executing threshold processing for the intra-frame average  G   op (n) of an open-loop pitch prediction gain G op (m) calculated using the weighted input vector. In this case, n represents the frame number; and m, the subframe number. 
         [0100]    In the mth subframe, the following two equations are calculated from a weighted input vector s wi (i) and the delay L tmp , and L tmp  which maximizes E sctmp   2 (m)/E sa2tmp  is obtained and set as L op : 
         [0000]    
       
         
           
             
               
                 E 
                 sctmp 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 
                   
                     L 
                     sfr 
                   
                   - 
                   1 
                 
               
                
               
                 
                   
                     s 
                     wi 
                   
                    
                   
                     ( 
                     i 
                     ) 
                   
                 
                  
                 
                   
                     s 
                     wi 
                   
                    
                   
                     ( 
                     
                       i 
                       - 
                       
                         L 
                         tmp 
                       
                     
                     ) 
                   
                 
               
             
           
         
       
       
         
           
             
               
                 E 
                 
                   sa 
                    
                   
                       
                   
                    
                   2 
                    
                   tmp 
                 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 
                   
                     L 
                     sfr 
                   
                   - 
                   1 
                 
               
                
               
                 
                   s 
                   wi 
                   2 
                 
                  
                 
                   ( 
                   
                     i 
                     - 
                     
                       L 
                       tmp 
                     
                   
                   ) 
                 
               
             
           
         
       
     
         [0101]    From the weighted input vector s wi (i) and the delay L op , the pitch prediction gain G op (m), m=1,Λ,N sfr  is calculated: 
         [0000]        G   op ( m )=10·log 10 ( g   op ( m )) 
         [0000]    where 
         [0000]    
       
         
           
             
               
                 g 
                 op 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               1 
               
                 1 
                 - 
                 
                   
                     
                       E 
                       sc 
                       2 
                     
                      
                     
                       ( 
                       m 
                       ) 
                     
                   
                   
                     
                       
                         E 
                         
                           sa 
                            
                           
                               
                           
                            
                           1 
                         
                       
                        
                       
                         ( 
                         m 
                         ) 
                       
                     
                      
                     
                       
                         E 
                         
                           sa 
                            
                           
                               
                           
                            
                           2 
                         
                       
                        
                       
                         ( 
                         m 
                         ) 
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             
               
                 E 
                 
                   sa 
                    
                   
                       
                   
                    
                   1 
                 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 
                   
                     L 
                     sfr 
                   
                   - 
                   1 
                 
               
                
               
                 
                   s 
                   wi 
                   2 
                 
                  
                 
                   ( 
                   i 
                   ) 
                 
               
             
           
         
       
       
         
           
             
               
                 E 
                 
                   sa 
                    
                   
                       
                   
                    
                   2 
                 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 
                   
                     L 
                     sfr 
                   
                   - 
                   1 
                 
               
                
               
                 
                   s 
                   wi 
                   2 
                 
                  
                 
                   ( 
                   
                     i 
                     - 
                     
                       L 
                       op 
                     
                   
                   ) 
                 
               
             
           
         
       
       
         
           
             
               
                 E 
                 sc 
               
                
               
                 ( 
                 m 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 
                   
                     L 
                     sfr 
                   
                   - 
                   1 
                 
               
                
               
                 
                   
                     s 
                     wi 
                   
                    
                   
                     ( 
                     i 
                     ) 
                   
                 
                  
                 
                   
                     s 
                     wi 
                   
                    
                   
                     ( 
                     
                       i 
                       - 
                       
                         L 
                         op 
                       
                     
                     ) 
                   
                 
               
             
           
         
       
     
         [0102]    The pitch prediction gain G op (m) or the intra-frame average  G   op (n) in the nth frame of G op (m) undergoes the following threshold processing to set the speech mode S mode : 
         [0000]      if (   G     op ( n )≧3.5) then  S   mode =2 
         [0000]      else S mode =0 
         [0103]    Determination of the speech mode is described in K. Ozawa et al., “M-LCELP Speech Coding at 4 kb/s with Multi-Mode and Multi-Codebook,” IEICE Trans. On Commun., Vol. E77-B, No. 9, pp. 1114-1121, 1994 (reference 3). 
         [0104]    The speech mode determination circuit  5550  outputs the speech mode S mode  to the first and second gain generation circuits  5220  and  5120 , and an index corresponding to the speech mode S mode  to the code output circuit  5010 . 
         [0105]    A pitch signal generation circuit  5210 , a sound source signal generation circuit  5110 , and the first and second gain generation circuits  5220  and  5120  sequentially receive indices output from a minimizing circuit  5070 . The pitch signal generation circuit  5210 , sound source signal generation circuit  5110 , first gain generation circuit  5220 , and second gain generation circuit  5120  are the same as the pitch signal decoding circuit  1210 , sound source signal decoding circuit  1110 , first gain decoding circuit  2220 , and second gain decoding circuit  2120  in  FIG. 1  except for input/output connections, and a detailed description of these blocks will be omitted. 
         [0106]    The code output circuit  5010  receives an index corresponding to the quantized LSP output from the LSP conversion/quantization circuit  5520 , an index corresponding to the quantized frame power output from the frame power calculation circuit  5540 , an index corresponding to the speech mode output from the speech mode determination circuit  5550 , and indices corresponding to the sound source vector, delay L pd , and first and second gains that are output from the minimizing circuit  5070 . The code output circuit  5010  converts these indices into a bit stream code, and outputs it via an output terminal  40 . 
         [0107]    The arrangement of a speech signal encoding apparatus in a speech signal encoding/decoding apparatus according to the fourth embodiment of the present invention is the same as that of the speech signal encoding apparatus in the conventional speech signal encoding/decoding apparatus, and a description thereof will be omitted. 
         [0108]    In the above-described embodiments, the long-term average of d 0 (m) varies over time more gradually than d 0 (m), and does not intermittently decrease in voiced speech. If the smoothing coefficient is determined in accordance with this average, discontinuous sound generated in short unvoiced speech intermittently contained in voiced speech can be reduced. By performing identification of voiced or unvoiced speech using the average, the smoothing coefficient of the decoding parameter can be completely set to 0 in voiced speech. 
         [0109]    Also for unvoiced speech, using the long-term average of d 0 (m) can prevent the smoothing coefficient from abruptly changing. 
         [0110]    The present invention smoothes the decoding parameter in unvoiced speech not by using single processing, but by selectively using a plurality of processing methods prepared in consideration of the characteristics of an input signal. These methods include moving average processing of calculating the decoding parameter from past decoding parameters within a limited section, auto-regressive processing capable of considering long-term past influence, and non-linear processing of limiting a preset value by an upper or lower limit after average calculation. 
         [0111]    According to the first effect of the present invention, sound different from normal voiced speech that is generated in short unvoiced speech intermittently contained in voiced speech or part of the voiced speech can be reduced to reduce discontinuous sound in the voiced speech. This is because the long-term average of d 0 (m) which hardly varies over time is used in the short unvoiced speech, and because voiced speech and unvoiced speech are identified and the smoothing coefficient is set to 0 in the voiced speech. 
         [0112]    According to the second effect of the present invention, abrupt changes in smoothing coefficient in unvoiced speech are reduced to reduce discontinuous sound in the unvoiced speech. This is because the smoothing coefficient is determined using the long-term average of d 0 (m) which hardly varies over time. 
         [0113]    According to the third effect of the present invention, smoothing processing can be selected in accordance with the type of background noise to improve the decoding quality. This is because the decoding parameter is smoothed selectively using a plurality of processing methods in accordance with the characteristics of an input signal.