Abstract:
Adaptive bit allocation to the channels of a sub/band coder (or to the coefficients of a transform coder) by using a fixed set of numbers of bits, only the selection of those channels to which the available bits are assigned being varied.

Description:
This is a continuation of application Ser. No. 06/768,786, filed 23 Aug. 1985, now abandoned. 
    
    
     FIELD OF THE INVENTION 
     This invention concerns frequency domain speech coding, such as sub-band coding in which the frequency spectrum of an input signal is separated into two or more sub-bands which are then coded individually, or transform coding in which a block of input samples are converted to a set of transform coefficients. 
     This application is related to commonly assigned copending U.S. application No. 672,232, U.S. Pat. No. 4,703,480, of Westall et al, filed 16 Nov. 1984. 
     BACKGROUND AND SUMMAARY OF THE INVENTION 
     Sub-band coding has been shown to be an effective method of reducing the bit-rate required for the transmission of signals - see, for example Crochiere, Webber and Flanagan &#34;Digital Coding of Speech in Sub-bands&#34;, Bell System Technical Journal, Vol. 55 pp. 1069-1085 (Oct. 1976) and Crochiere, &#34;On the Design of Sub-band Coders for Low Bit-Rate Speech Communications, ibid Vol. 56, pp 747-779 (May-Jun. 1977). 
     The technique involves splitting the broadband signal into two or more frequency bands and encoding each band separately. Each band can then be down-sampled, and coding efficiency improved by using different coding strategies, which can be optimized to the statistics of the signal. This is especially advantageous for speech transmission because the coders can exploit certain perceptual effects connected with hearing. In particular, provided that appropriate quantizers are used, the technique will result in the quantization noise at the output of the codec having a similar power spectral distribution to that of the uncoded signal; it is well-known that the human ear is relatively tolerant to noise in the parts of the spectrum occupied by high level wanted signals. Additionally, the higher frequency components can be represented with reduced accuracy because the ear is less sensitive to their absolute content. Although benefits can be obtained using a fixed coding scheme, an adaptive scheme which takes account of the changing properties of the signal with time, is preferred. AFter transmission, the individual sub-bands are up-sampled and passed through interpolation filters prior to recobination. 
     In transform coding, a block of (say) 128 input samples is subjected to a suitable transformation such as the discrete cosine transform to produce a set of 128 coefficients; again efficiency can be improved by adaptive coding. 
     When adaptive bit allocation is used, the coding characteristics of the system are matched to the short-term spectrum of the input signal. One such proposal (J. M. Tribolet and R. E. Crochiere, &#34;Frequency Domain Coding of Speech&#34; IEEE Trans. on ASSP, Vol. ASSP-27, No. 5, Oct. 1979) utilizes a fully adaptive assignment of bits to each sub-band signal. The algorithm proposed is: ##EQU1## where R is the total number of bits available divided by the number of sub-bands N in the system, σ i   2  is the energy of the ith sub-band signal within the time interval under consideration, R i  is the number of bits allocated to the ith sub-band and γ may be varied for noise shaping. 
     The problem with the bit allocation strategy of equation (1) is that the value of R i  is usually fractional and often negative. The process of (i) rounding R i  to an integer value, (ii) restricting the maximum value of R i  to (typically) 5 and (iii) setting negative values of R i  to 0, may result in the total number of bits allocated exceeding or falling below the number of bits available. In this case readjustments have to be made by reapplying equation (1) or by an arbitrary process of adding or subtracting bits to or from the bands. Moreover, the amount of computation involved is substantial. 
     According to the present invention there is provided a coder for speech signals comprising separation means for receiving speech signals and generating series of value, each series representing respective portions of the frequency spectrum of the input signal, encoding means for digitally encoding each series, and bit allocation means for varying the number of bits used for encoding the respective series in dependence on the relative energy contents thereof, characterised in that the number of series to which any given number of bits is allocated is constant, only the selector of the series to which respective numbers of bits are allocated being varied. 
     In another aspect the invention provides a method of coding a speech signal in which the signal is divided into separate channels representing respective portions of the frequency spectrum of the input signal, and the channels are each encoded using a variable number of bits dependent upon the relative energy contents of the channels, characterized in that the number of channels to each of which any given number of bits is allocated is constant, only the selection of the channels to which respective number of bits are allocated being varied. 
     The series or channels referred to may be the channels of a sub-band coder or the transform coefficients of a transform coder. 
     Where a scaling factor is applied to the signals, preferably the bit allocation is performed as a function of the scaling factor, so that decoding can be carried out by reference to the scale factors, avoiding the necessity for tranmission of additional side information. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     An embodiment of the invention will now be described, by way of example, with reference to the accompanying drawings, in which 
     FIG. 1 is a block diagram of a sub-band coder according to invention; and 
     FIG. 2 illustrates the bit allocation process of the apparatus of FIG. 1. 
    
    
     DETAILED DESCRIPTION 
     FIG. 1 shows a 14 band 32 kbit/s sub-band coder system. The input signal having a nominal bandwidth of 7 kHz is sampled at 14 kHz--illustrated schematically by a switch 1--and the full band spectrum is divided into fourteen uniform bands by a four-stage tree-structured filter bark 2 employing quadrature mirror filters. 32-tap finite impulse response filters are suggested though lower order filters could be employed at the higher stages of the filter bank. The filter outputs are, as is conventional, down sampled (by means not shown) to 1 kHz. 
     Laplacian forward adaptive quantizers are employed for the quantization of the sub-band signals. Essentially there are two stages here; firstly (normalization stages N1 . . . N14) the signal is normalized by dividing by a scaling factor which is defined every 16 ms from estimates of the energy of the relevant sub-band. Basically this is the rms value of the signal over that period. 16 samples (for sub-band 1, x 1j  -j=1, . . . 16) are buffered in a register 3, and the scaling factor or step size Δ 1  calculated at 4 using the relation ##EQU2## The scaling factors are quantized to 5-bit accuracy in a quantizer 5 and the quantized value Δ transmitted as side information to the receiver. Thus the side information accounts for almost 4.5 kbit/s and thus approximately 27.5 kbit/s is available for transmission of the samples themselves. These processes are carried out for each of the fourteen sub-bands. The normalized samples (S kj  =x kj  /Δ k ) for each sub-band are then fed to a quantizer 6 which encodes them using the desired number of bits B K  prior to transmission via multiplexer 7. Bit allocation is indicated in FIG. 1 schematically as unit 8. 
     In the prior proposal of Tribolet and Crochiere, equation (1) was used to define the bit allocation, In the present proposal, equation (1) is used to determine the bit allocation patterns for all the 16 msec frames in an input training sequence which is free of any silent intervals. γ is set to -0.3 and the maximum number of bits M allowed in the allocation is set to 5. Let N i  represent the total number of times in the training sequence that i bits are allocated, where i=1 . . . ,5. 
     Next, we define f i  as: ##EQU3## where N T  is the total number of bits available for allocation throughout the training sequence. f i  therefore represents the portion of N T  used in allocating i bits for the coding of sub-band signals. If there are N t  bits available for allocation the expected number of bands n i  that receive i bits can be calculated according to: 
     
         n.sub.i =nearest integer of (f.sub.i N.sub.t)/             (3) 
    
     for i=1, . . . , M. A time-invariant bit allocation pattern is thus obtained using the n i  estimates, i.e., 
     (n 5  * 5 bits, n 4  *4 bits, . . . ,n 1  * 1 bit; 0 bit for the remaining bands), 
     assuming M is equal to five. This means that, within a 16 msec frame, n 5  sub-bands receive 5 bits, n 4  sub-bands receive 4 bits and so on. Manual adjustment is normally required to ensure that the total number of bits in the invariant allocation pattern gives the desired total transmission bit rate. For the 14-band coder, the 27.5 kbit/sec capcity and 1 kHz sampling rate permit 27 bits, and the bit pattern obtained was given by: 
     (1*5 1*4, 3*3, 2*2, 5*1, 2*0) 
     Though the pattern is fixed, the allocation is based on the scale factors of the sub-band signals. For each frame of 16 msec the bank with the largest scaling factor is allocated 5 bits; the 2nd largest 4 bits and so on. The processing requirements of this algorithm are considerably reduced when compared with those of the fully adaptive scheme, since once the invariant allocation pattern has been derived, it is fixed for a given coder. Also because the allocation of these bit groups to the particular sub-bands is determined by reference to the scaling factors, the transmission of further side information to the receiver is not necessary. 
     Considering now transform coding, in this example an adaptive transform coder using the discrete cosine transform employs a blocksize of 128 samples. An estimation of the 16 primary coefficients of the basic spectrum (R Zelinski and P Noll, &#34;Adaptive transform coding of speech signals&#34;, IEEE Trans. on ASSP, Vol ASSP-25, No. 4, pp 299-309, Aug. 1977) is carried out every 8 msec although the average of two set sof these coefficients, from adjacent frames, is used to define the step-sizes of the transofrm coefficient qauantizers and the bit allocation pattern. 3 bit Gaussian quantizers are used to quantize the 16 primary values of the average basis spectrum. Normalization of the input samples is also carried out using a normalization parameter which is evaluated every 256 samples. The normalization parameter is quantized using a 5 bit Gaussian quantizer. 
     The problem of efficiently coding the resulting 128 coefficients is similar to that of coding the sub-band samples in the previous examples. Here equations 1 to 3 are applied to a training sequence to obtain a bit allocation pattern (γ=-0.2) of: 
     (1*7, 4*6, 5*5, 9*4, 20*3, 25*2, 28*1, 36*0), that is, out of the 128 transform coefficnets, 1 coefficient is quantized with 7 bits 4 coefficients with 6 bits etc. 
     The advent of digital signal processing (DSP) devices has facilitated the real-time implementation of a number of otherwise difficult to implement speech coding algorithms. A sub-band coder for example, can be conveniently implemented using a DSP chip. The implementation complexity of a coder depends to an extent on the number of multiplications/divisions, additions/substractions and on the size of memory required for storing the intermediate variables of the coding algorithm. Table 1 illustrates the computational requirements, including delays, of the coders considered. SBC and ATC indicate sub-band and transform coding respectively, whilst ABA indicates adaptive bit allocation according to equation (1) and SBA the simplified bit allocation as described above. 
     
         ______________________________________   Memory                         System   size     No. of ×/÷                         No of +/-                                  delay   (words)  (/sample)    (/sample)                                  (m sec)______________________________________ADPCM   50       37           38       ≃ 0SBC/SBA 700      62           65       45(can bereduced to)   500      45           48       33ATC/ABA 900      9            14       25______________________________________ TABLE 1 Summary of the system complexity for the various decoders. 
    
     A fast algorithm for the cosine transform was assumed in deriving the above estimates. Note that the adaptive transform coders also require additional log 2  and inverse log 2  look-up Tables. For the sub-band coder, the higher stages of the quadrature mirror filter analysis bank can be implemented using lower order FIR filters to reduce the memory size and coder delay. Excluded in the estimation is the memory required for the program instructions of the coding algorithm. Currently, due to their stringent real-time and memory requirements, large blocksize transform coders can be more conveniently implemented using array processors. 
     The performance of the coders described has been assessed by computer simulation in terms of 
     (1) average segmental signal-to-noise ratio 
     (2) long-term average spectral density plot of the output noise and 
     (3) informal subjective listening tests. 
     The input data used in our computer simulation experiments consisted of two sentences of male speech and two sentences of female speech. Table 2 shows the average segmental SNR performance (in dBs) of the coders. 
     
         ______________________________________    Male (average                Female (average                               TotalCoder    of 2 sentences)                of 2 sentences)                               average______________________________________SBC/ABA  19.26       20.52          19.88SBC/SBA  18.79       19.68          19.24ATC/ABA  14.60       12.58          13.59ATC/SBA  13.73       11.50          12.62ADPCM    13.55       18.02          15.79______________________________________ TABLE 2. Average segmental SNR measurements of the various coders. 
    
     The two sub-band coding schemes offer the best SNR measurements of 19.88 and 19.24 dB. Informal subjective listening tests indicate that the SBC/ABA system produces an excellent quality recovered speech. This is due to the fact that the output noise level is low enough and is masked by the speech energy in each band. Also, the use of the simplified bit allocation algorithm did not affect the subjective quality of the 14-band coder though there is a drop of 0.6 dB in SNR. 
     The next scheme, in order to merit, is adaptive transform coding employing the full algorithm. The distortion due to inter-block discontinuities can be substantially reduced by smoothing. It should be noted that subjectively the difference between sub-band and transform coding is not as significant as suggested by their large difference in SNR values. The transform coder employing the simplified bit allocation algorithm was found to have an SNR reduction of 1 dB compared to the one with the fully adaptive algorithm. The block-end distortion becomes more pronounced and the recovered speech is also degraded by a &#34;whispery&#34; noise. This means that as the noise level, at this bit rate, is just at the threshold of audibility, the use of the full adaptation algorithm becomes necessary. However, if mor ebits are allowed for the transform coder, the SBA algorithm might prove to be a valuable method in reducing the coder complexity. 
     In general, some degradation in the quality of the ATC speech at 32 kbits/sec is caused by interblock discontinuities. Though the underlying speech can be very good, the effect of discontinuities is perceptually unaccpetable. One suggested solution to this problem is to apply 10 percent overlap between adjacent blocks. Another method is to employ either median filtering or a moving average filtering process to a few samples at both ends of each block. The 10 percent overlap scheme is found to be the least effective because fewer bits are available for the quantization of the transform coefficients which in turn increases the amount of block-end distortion. The method of median filtering is found to give some subjective improvement while the best performance is obtained from the moving averaging method. In its use, 10 samples x 1 , x 2 , . . . , x 10  (the last five samples of the previous block and the first five samples of the present block) were replaced by y 1 , y 2 , . . . ,y 10 , where y i  =1/3(x i-1  +x i  +x i-1 ), and i=1, . . . , 10. 
     An exemplary method used for implementing the bit allocation algorithm 8 is depicted at FIG. 2. Here, the quantized normalization factors Δ, through Δ 14  used for each 16 ms data block or &#34;frame&#34; are supplied as inputs to block 82 where they are re-arranged into descending order according to their magnitudes. This reordered sequence (e.g., Δ 5 , Δ 2 , Δ 1 , . . . ) is then used at block 84 in conjunction with the previously derived magnitude ordered bit allocation pattern form the 14 sub-bands (e.g., 1*5, 1*4, 3*3, 2*2, 5*1, 2*0) to correspondingly allocate the correct number of bits to the correct band (e.g., 5 bits for the 5th sub-band, 4 bits for the 2nd sub-band, 3 bits for the 1st sub-band, . . . ). The resulting allocated numbers of bits are then output at B 1  . . . B 14  to control the appropriate quantizers 6 for that particular 16 ms time block (e.g., 27 bits) as depicted in FIG. 1.