AU7201300A - Speech encoding method - Google Patents
Speech encoding method Download PDFInfo
- Publication number
- AU7201300A AU7201300A AU72013/00A AU7201300A AU7201300A AU 7201300 A AU7201300 A AU 7201300A AU 72013/00 A AU72013/00 A AU 72013/00A AU 7201300 A AU7201300 A AU 7201300A AU 7201300 A AU7201300 A AU 7201300A
- Authority
- AU
- Australia
- Prior art keywords
- vector
- quantization
- output
- encoding
- noise
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Abandoned
Links
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
S&FRef: 356229D1
AUSTRALIA
PATENTS ACT 1990 COMPLETE SPECIFICATION FOR A STANDARD PATENT
ORIGINAL
Name and Address of Applicant: SActual Inventor(s): Address for Service: Sony Corporation 7-35, Kitashinagawa 6-chome Shinagawa-ku Tokyo Japan Masayuki Nishiguchi, Kazuyuki lijima, Jun Matsumoto, Shiro Omori Spruson Ferguson St Martins Tower 31 Market Street Sydney NSW 2000 Invention Title: Speech Encoding Method The following statement is a full description of this invention, including the best method of performing it known to me/us:- 5845c TITLE OF THE INVENTION Speech Encoding Method BACKGROUND OF THE INVENTION s Field of the Invention This invention relates to a speech encoding method.
Description of the Related Art There have hitherto been known a variety of encoding methods for encoding an audio signal (inclusive of speech and acoustic signals) for signal compression by exploiting statistic properties of the signals in the time domain and in the frequency domain and psychoacoustic characteristics of the human ear. The encoding method may roughly be classified into time-domain encoding, frequency domain encoding and analysis/synthesis encoding.
Examples of the high-efficiency encoding of speech signals include sinusoidal analytic encoding, such as harmonic encoding or multi-band excitation (MBE) encoding, sub-band coding (SBC), linear predictive coding (LPC), discrete cosine transform (DCT), modified DCT (MDCT) and fast Fourier transform (FFT) In the conventional MBE encoding or harmonic encoding, unvoiced speech portions are generated by a noise generating [R:\LIBQ]583.doc:mxl circuit. However, this method has a drawback that explosive consonants, such as p, k or t, or fricative consonants, cannot be produced impeccably.
Moreover, if encoded parameters having totally different properties, such as line spectrum pairs (LSPs), are interpolated at a transient portion between a voiced portion and an unvoiced (UV) portion, extraneous or foreign sounds tend to be produced.
In addition, with the conventional sinusoidal synthetic coding, the low-pitch speech, above all, the male speech, tends to become unnatural "stuffed" speech.
SUMMARY OF THE INVENTION The invention discloses a method for encoding an audible signal, comprising the steps of: converting parameters derived from the input audible signal into a frequency- S domain signal; and performing weighted vector quantization of said parameters, the weight of said S. is weighted vector quantization being calculated based on results of an orthogonal transform of parameters derived from an impulse response of a weight transfer function.
Further, in accordance with embodiments of the invention, by calculating the *.oo weight of the time of weighted vector quantization of the parameters of the input signal converted into the frequency domain signal based on the results of orthogonal transform 20 of the parameters derived from the impulse response of the weight transfer function, the 0 0 .processing volume may be diminished to a fractional value thereby simplifying the structure or expediting the processing operations.
The next page is page 4 JR:\LIBQj583.doc:mxl -4- BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing a basic structure of a speech signal encoding apparatus (encoder) for carrying out the encoding method according to the present invention.
Fig. 2 is a block diagram showing a basic structure of a speech signal decoding apparatus (decoder) for carrying out the decoding method according to the present invention.
Fig. 3 is a block diagram showing a more specified structure of the speech signal encoder shown in Fig. 1.
eooeo [R:\LIBQ]583.doc:mxl Fig.4 is a block diagram showing a more detailed structure of the speech signal decoder shown in Fig.2.
is a block diagram showing a basic structure of an LPC quantizer.
r Fig.6 is a block diagram showing a more detailed structure of the LPC quantizer.
Fig.7 is a block diagram showing a basic structure of the vector quantizer.
Fig.8 is a block diagram showing a more detailed structure of o the vector quantizer.
Fig.9 is a flowchart for illustrating a specified example of a processing sequence for calculating the weight used for vector :quantization.
is a block circuit diagram showing a specified structure of a CELP coding part (second encoding part) of the speech signal encoder according to the present invention.
Fig.11 is a flowchart for illustrating the processing flow in the arrangement of i Fig.12 shows the state of the Gaussian noise and the noise 2- after clipping at different threshold values.
Fig.13 is a flowchart showing the processing flow at the time of generating a shape,codebook by learning.
Fig.14 illustrates 10-order linear spectrum pairs (LSPs) derived from a-parameters obtained by 10-order LPC analysis.
2 Fig.15 illustrates the manner of gain change from a UV frame to a V frame.
Fig.16 illustrates the manner of interpolation of the spectrum and the waveform synthesized from frame to frame.
Fig.17 illustrates the manner of overlap at a junction between the voiced portion and the unvoiced (UV) portion.
Fig.18 illustrates the operation of noise addition at the time of synthesis of the voiced sound.
Fig.19 illustrates an example of calculation of the amplitude of the noise added at the time of synthesis of the voiced sound.
1 o Fig.20 illustrates an example of constitution of a post filter.
Fig.21 illustrates the gain updating period and the filter coefficient updating period of the post-filter.
Fig.22 illustrates processing for a junction portion at the frame boundary of the gain and filter coefficients of a post-filter.
1' Fig.23 is a block diagram showing the constitution of a transmitting side of a portable terminal employing a speech signal encoder according to the present invention.
Fig.24 is a block diagram showing the constitution of a receiving side of a portable terminal employing a speech signal 'decoder according to the present invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Referring to the drawings, preferred embodiments of the present invention will be explained in detail.
Fig.1 shows the basic structure of an encoding apparatus (encoder) for carrying out a speech encoding method according to the present invention.
The basic concept underlying the speech signal encoder of Fig. 1 is that the encoder has a first encoding unit 110 for finding short-term prediction residuals, such as linear prediction encoding (LPC) residuals, of the input speech signal, in order to effect sinusoidal analysis, such as harmonic coding, and a second encoding unit 120 for encoding the input speech signal by waveform encoding having phase reproducibility, and that the first encoding unit 110 and the second encoding unit 120 are used for encoding the voiced speech of the input signal and for encoding the unvoiced (UV) portion of the input signal, respectively.
The first encoding unit 110 employs a constitution of encoding, for example, the LPC residuals, with sinusoidal analytic encoding, such as harmonic encoding or multi-band excitation (MBE) encoding. The second encoding unit 120 employs a constitution of carrying out code excited linear prediction (CELP) using vector quantization by closed loop search of an optimum vector by closed loop search and also using, for example, an analysis by synthesis method.
In an embodiment shown in Fig.l 1, the speech signal supplied to an input terminal 101 is sent to an LPC inverted filter 111 and an LPC analysis and quantization unit 113 of a first encoding unit 110. The LPC coefficients or the so-called a-parameters, obtained by an LPC analysis quantization unit 113, are sent to the LPC rinverted filter 111 of the first encoding unit 110. From the LPC inverted filter 111 are taken out linear prediction residuals (LPC residuals) of the input speech signal. From the LPC analysis quantization unit 113, a quantized output of linear spectrum pairs (LSPs) are taken out and sent to an output terminal 102, as later explained. The LPC residuals from the LPC inverted filter 111 are sent to a sinusoidal analytic encoding unit 114. The sinusoidal analytic encoding unit 114 performs pitch detection and calculations of the amplitude of the spectral envelope as well as V/UV discrimination by a V/UV discrimination unit 115. The spectra 1i envelope amplitude data from the sinusoidal analytic encoding unit 114 is sent to a vector quantization unit 116. The codebook index from the vector quantization unit 116, as a vector-quantized output of the spectral. envelope, is sent via a switch 117 to an output terminal 103, while an output of the sinusoidal analytic encoding t-unit 114 is sent via a switch 118 to an output terminal 104. A V/UV discrimination output of the V/UV discrimination unit 115 is sent to an output terminal 105 and, as a control signal, to the switches 117, 118. If the input speech signal is a voiced (V) sound, the index and the pitch are selected and taken out at the output terminals 103, 104, respectively.
The second encoding unit 120 of Fig.1 has, in the present embodiment, a code excited linear prediction coding (CELP coding) configuration, and vector-quantizes the time-domain waveform using a closed loop search employing an analysis by synthesis L- method in which an output of a noise codebook 121 is synthesized by a weighted synthesis filter, the resulting weighted speech is sent to a subtractor 123, an error between the weighted speech and the speech signal supplied to the input terminal 101 and thence through a perceptually weighting filter 125 is taken out, the error thus s- found is sent to a distance calculation circuit 124 to effect distance calculations and a vector minimizing the error is searched by the noise codebook 121. This CELP encoding is used for encoding the unvoiced speech portion, as explained previously. The codebook index, as the UV data from the noise codebook 121, is taken out at i an output terminal 107 via a switch 127 which is turned on when the result of the V/UV discrimination is unvoiced (UV).
Fig.2 is a block diagram showing the basic structure of a speech signal decoder, as a counterpart device of the speech signal encoder of Fig.l, for carrying out the speech decoding method j" according to the:present invention.
Referring to Fig.2, a codebook index as a quantization output of the linear spectral pairs (LSPs) from the output terminal 102 of Fig.1 is supplied to an input terminal 202. Outputs of the output terminals 103, 104 and 105 of Fig.l, that is the pitch, V/UV ic discrimination output and the index data, as envelope quantization output data, are supplied to input terminals 203 to 205, respectively. The index data as data for the unvoiced data are supplied from the.output terminal 107 of Fig.l is supplied to an input terminal 207.
2_ The index as the envelope quantization output of the input terminal 203 is sent to an inverse vector quantization unit 212 for inverse vector quantization to find a spectral envelope of the LPC residues which is sent to a voiced speech synthesizer 211. The voiced speech synthesizer 211 synthesizes the linear prediction encoding (LPC) residuals of the voiced speech portion by sinusoidal synthesis. The synthesizer 211 is fed also with the pitch and the V/UV discrimination output from the input terminals 204, 205. The LPC residuals of the voiced speech from the voiced speech synthesis unit 211 are sent to an LPC synthesis filter 214. The index data of io the UV data from the input terminal 207 is sent to an unvoiced sound synthesis unit 220 where reference is had to the noise codebook for taking out the LPC residuals of the unvoiced portion.
These LPC residuals are also sent to the LPC synthesis filter 214.
In the LPC synthesis filter 214, the LPC residuals of the voiced S( portion and the LPC residuals of the unvoiced portion are processed by LPC synthesis. Alternatively, the LPC residuals of the voided portion and the LPC residuals of the unvoiced portion summed together may be processed with LPC synthesis. The LSP index data from the input terminal 202 is sent to the LPC parameter z reproducing unit 213 where a-parameters of the LPC are taken out and sent to the LPC synthesis filter 214. The speech signals synthesized by the LPC synthesis filter 214 are taken out at an output terminal 201.
Referring to Fig.3, a more detailed structure of a speech signal r3- encoder shown in Fig.1 is now explained. In Fig.3, the parts or components similar to those shown in Fig.l are denoted by the same reference numerals.
In the speech signal encoder shown in Fig.3, the speech signals supplied to the input terminal 101 are filtered by a high-pass filter r HPF 109 for removing signals of an unneeded range and thence supplied to an LPC analysis circuit 132 of the LPC analysis/quantization unit 113 and to the inverted LPC filter 111.
The LPC analysis circuit 132 of the LPC analysis/ quantization unit 113 applies a Hamming window, with a length of the input to signal waveform on the order of 256 samples as a block, and finds a linear prediction coefficient, that is a so-called a-parameter, by the autocorrelation method. The framing interval as a data outputting unit is set to approximately 160 samples. If the sampling frequency fs is 8 kHz, for example, a one-frame interval is 20 msec or 160 samples.
The a-parameter from the LPC analysis circuit 132 is sent to an a-LSP conversion circuit 133 for conversion into line spectrum pair (LSP) parameters. This converts the a-parameter, as found by Sdirect type filter coefficient, into for example, ten, that is five o pairs of the LSP parameters. This conversion is carried out by, for example, the Newton-Rhapson method. The reason the a-parameters are converted into the, LSP parameters is that the LSP parameter is superior in interpolation characteristics to the a-parameters.
The LSP parameters from the e-LSP conversion circuit 133 are matrix- or vector quantized by the LSP quantizer 134. It is possible to take a frame-to-frame difference prior to vector quantization, or to collect plural frames in order to perform matrix quantization. In the present case, two frames, each 20 msec long, of the LSP parameters, calculated every 20 msec, are handled together and C processed with matrix quantization and vector quantization.
The quantized output of the quantizer 134, that is the index data of the LSP quantization, are taken out at a terminal 102, while the quantized LSP vector is sent to an LSP interpolation circuit 136.
The LSP interpolation circuit 136 interpolates the LSP vectors, S* quantized every 20 msec or 40 msec, in order to provide an Soctatuple rate. That is, the LSP vector is updated every 2.5 msec.
The reason is that, if the residual waveform is processed with the analysis/synthesis by the harmonic encoding/decoding method, the i envelope of the synthetic waveform presents an extremely sooth waveform, so that, if the LPC coefficients are changed abruptly every 20 msec, a foreign noise is likely to be produced. That is, if the LPC coefficient is changed gradually every 2.5 msec, such foreign noise may be prevented from occurrence.
20o For inverted filtering of the input speech using the interpolated LSP vectors produced every 2.5 msec, the LSP parameters are converted by an LSP to a conversion circuit 137 into a-parameters, which are filter coefficients of ten-order direct type filte.r. An output of the LSP to a conversion circuit 137 is sent j to the LPC inverted filter circuit 111 which then performs inverse filtering for producing a smooth output using an a-parameter updated every 2.5 msec. An output of the inverse LPC filter 111 is sent to an orthogonal transform circuit 145, such as a DCT circuit, of the sinusoidal analysis encoding unit 114, such as a 7- harmonic encoding circuit.
The a-parameter from the LPC analysis circuit 132 of the LPC analysis/quantization unit 113 is sent to a perceptual weighting filter calculating circuit 139 where data for perceptual weighting is found. These weighting data are sent to a perceptual weighting lo vector quantizer 116, perceptual weighting filter 125 and the perceptual weighted synthesis filter 122 of the second encoding unit 120.
The sinusoidal analysis encoding unit 114 of the harmonic .0 encoding circuit analyzes the output of the inverted LPC filter 111 i. by a method of harmonic encoding. That is, pitch detection, *S *s calculations of the amplitudes Am of the respective harmonics and voiced unvoiced (UV) discrimination, are carried out and the 6 numbers of the amplitudes Am or the envelopes of the respective harmonics, varied with the pitch, are made constant by dimensional la conversion.
In an illustrative example of the sinusoidal analysis encoding unit 114 shown in Fig.3, commonplace harmonic encoding is used.
In particular, in, multi-band excitation (MBE) encoding, it is assumed in modelling that voiced portions and unvoiced portions are z2rpresent in each frequency area or band at the same time point (in -14the same block or frame). In other harmonic encoding techniques, it is uniquely judged whether the speech in one block or in one frame is voiced or unvoiced. In the following description, a given frame is judged to be UV if the totality of the bands is UV, insofar as the MBE encoding is concerned. Specified examples of the technique of the analysis synthesis method for MBE as described above may be found in US 5,765,127, US 5,878,388, US 5,960,388 and EP 0590155.
The open-loop pitch search unit 141 and the zero-crossing counter 142 of the sinusoidal analysis encoding unit 114 of Fig. 3 is fed with the input speech signal from the input terminal 101 and with the signal from the high-pass filter (HPF) 109, respectively. The orthogonal transform circuit 145 of the sinusoidal analysis encoding unit 114 is supplied with LPC residuals or linear prediction residuals from the inverted LPC filter 111. The open loop pitch search unit 141 takes the LPC residuals of the input signals to perform relatively rough pitch search by open loop search. The extracted rough pitch data is sent to a fine pitch search unit 146 by closed loop search as later explained.
15 From the open loop pitch search unit 141, the maximum value of the normalized self correlation obtained by normalizing the maximum value of the autocorrelation of the S°°LPC residuals along with the rough pitch data, are taken out along with the rough pitch *ee**e data so as to be sent to the V/UV discrimination unit 115.
The orthogonal transform circuit 145 performs orthogonal
S°.
e.eee* [R:\LIBQ]423.doc iad transform, such as discrete Fourier transform (DFT), for converting the LPC residuals on the time axis into spectral amplitude data on the frequency axis. An output of the orthogonal transform circuit 145 is sent to the fine pitch search unit 146 and a spectral r evaluation unit 148 configured for evaluating the spectral amplitude or envelope.
The fine pitch search unit 146 is fed with relatively rough pitch data extracted by the open loop pitch search unit 141 and with frequency-domain data obtained by DFT by the orthogonal transform (k unit 145. The fine pitch search unit 146 swings the pitch data by several samples, at a rate of 0.2 to 0.5, centered about the rough pitch value data, in order to arrive ultimately at the value of the fine pitch data having an optimum decimal point (floating point).
The analysis by synthesis method is used as the fine search 'r technique for selecting a pitch so that the power spectrum will be closest to the power spectrum of the original sound. Pitch data from the closed-loop fine pitch search unit 146 is sent to an output terminal 104 via a switch 118.
In the spectral evaluation unit 148, the amplitude of each zo harmonics and the spectral envelope as the sum of the harmonics are evaluated based. on the spectral amplitude and the pitch as the orthogonal transform ,output of the LPC residuals, and sent to the fine pitch search unit 146, V/UV discrimination unit 115 and to the perceptually weighted vector quantization unit 116.
1'Y The V/UV discrimination unit 115 discriminates V/UV of a frame based on an output of the orthogonal transform circuit 145, an optimum pitch from the fine pitch search unit 146, spectral amplitude data from the spectral evaluation unit 148, maximum value of the normalized autocorrelation r(p) from the open loop J" pitch search unit 141 and the zero-crossing count value from the zero-crossing counter 142. In addition, the boundary position of the band-based V/UV discrimination for the MBE may also be used as a condition for V/UV discrimination. A discrimination output of the V/UV discrimination unit 115 is taken out at an output terminal lo'105.
An output unit of the spectrum evaluation unit 148 or an input unit of the vector quantization unit 116 is provided with a number of data conversion unit (a unit performing a sort of sampling rate .conversion). The number of data conversion unit is used for setting the amplitude data jAml of an envelope to a constant value in consideration that the number of bands split on the frequency axis and the number of data differ with the pitch. That is, if the effective band is up to 3400 kHz, the effective band can be split into 8 to 63 bands depending on the pitch. The number of mMX 2o 1 of the amplitude data jAml, obtained from band to band, is changed in a range from 8 to 63. Thus the data number conversion unit converts the amplitude data of the variable number mMx 1 to a pre-set number M of data, such as 44 data.
The amplitude data or envelope data of the pre-set number M, such as 44, from the data number conversion unit, provided at an output unit of the spectral evaluation unit 148 or at an input unit of the vector quantization unit 116, are handled together in terms of a pre-set number of data, such as 44 data, as a unit, by the vector quantization unit 116, by way of performing weighted vector quantization. This weight is supplied by an output of the perceptual weighting filter calculation circuit 139. The index of the envelope from the vector quantizer 116 is taken out by a switch 117 at an output terminal 103. Prior to weighted vector quantization, it is advisable to take inter-frame difference using a suitable leakage o coefficient for a vector made up of a pre-set number of data.
The second encoding unit 120 is explained. The second encoding unit 120 has a so-called CELP encoding structure and is used in particular for encoding the unvoiced portion of the input speech signal. In the CELP encoding structure for the unvoiced !l-portion of the input speech signal, a noise output, corresponding to the LPC residuals of the unvoiced sound, as a representative output value of the noise codebook, or a so-called stochastic codebook 121, is sent via a gain control circuit 126 to a perceptually weighted synthesis filter 122. The weighted synthesis filter 122 LPC synthesizes the input noise by LPC synthesis and sends the produced weighted unvoiced signal to the subtractor 123. The subtractor 123 is fed with a signal supplied from the input terminal 101 via an high-pass filter (HPF) 109 and perceptually weighted .by a perceptual weighting filter 125. The subtractor finds the difference or error between the signal and the signal from the synthesis filter 122. Meanwhile, a zero input response of the perceptually weighted synthesis filter is previously subtracted from an output of the perceptual weighting filter output 125. This error is fed to a distance calculation circuit 124 for calculating the Sdistance. A representative vector value which will minimize the error is searched in the noise codebook 121. The above is the summary of the vector quantization of the time-domain waveform employing the closed-loop search by the analysis by synthesis method.
c As data for the unvoiced (UV) portion from the second encoder 120 employing the CELP coding structure, the shape index of the codebook from the noise codebook 121 and the gain index of the codebook from the gain circuit 126 are taken out. The shape index, which is the UV data from the noise codebook 121, is sent to an output terminal 107s via a switch 127s, while the gain index, which is the UV data of the gain circuit 126, is sent to an output terminal 107g via a switch 127g.
These switches 127s, 127g and the switches 117, 118 are turned on and off depending on the results of V/UV decision from c-the V/UV discrimination unit 115. Specifically, the switches 117, 118 are turned on, if the results of V/UV discrimination of the speech signal of the ,frame currently transmitted indicates voiced while the switches 127s, 1 2 7g are turned on if the speech signal of the frame currently transmitted is unvoiced
(UV).
r Fig.4 shows a more detailed structure of a speech signal decoder shown in Fig.2. In Fig.4, the same numerals are used to denote the opponents shown in Fig.2.
In Fig.4, a vector quantization output of the LSPs corresponding to the output terminal 102 of Figs.1 and 3, that is r the codebook index, is supplied to an input terminal 202.
The LSP index is sent to he inverted vector quantizer 231 of the LSP for the LPC parameter reproducing unit 213 so as to be inverse vector quantized to line spectral pair (LSP) data which are then supplied to LSP interpolation circuits 232, 233 for ,o interpolation. The resulting interpolated data is converted by the LSP to a conversion circuits 234, 235 to a parameters which are sent to the LPC synthesis filter 214. The LSP interpolation circuit 232 and the LSP to a conversion circuit 234 are designed for voiced sound, while the LSP interpolation circuit 233 and the r LSP to a conversion circuit 235 are designed for unvoiced (UV) sound. The LPC synthesis filter 214 is made up of the LPC Ssynthesis filter 236 of the voiced speech portion and the LPC Ssynthesis filter 237 of the unvoiced speech portion. That is, LPC coefficient interpolation is carried out independently for the voiced 2c-speech portion and the unvoiced speech portion for prohibiting ill effects which might otherwise be produced in the transient portion from the voiced speech porion to the unvoiced speech portion or vice versa by interpolation of the LSPs of totally different properties.
as To an input terminal 203 of Fig.4 is supplied code index data corresponding to the weighted vector quantized spectral envelope Am corresponding to the output of the terminal 103 of the encoder of Figs. 1 and 3. To an input terminal 204 is supplied pitch data from the terminal 104 of Figs. 1 and 3 and, to an input terminal 205 is supplied V/UV discrimination data from the terminal 105 of Figs. 1 and 3.
The vector-quantized index data of the spectral envelope Am from the input terminal 203 is sent to an inverted vector quantizer 212 for inverse vector quantization where a conversion inverted from the data number conversion is carried out. The resulting spectral envelope data is sent to a sinusoidal synthesis circuit 215.
If the inter-frame difference is found prior to vector quantization of the spectrum during encoding, inter-frame difference is decoded after inverse vector quantization for producing the spectral envelope data.
The sinusoidal synthesis circuit 215 is fed with the pitch from the input terminal 204 and the V/UV discrimination data from the input terminal 205. From the sinusoidal synthesis circuit 215, LPC residual data corresponding to the output of the LPC inverse 15 filter 111 shown in Figs. 1 and 3 are taken out and sent to an adder 218. The specified technique of the sinusoidal synthesis is disclosed in, for example, the US patents and published EP application listed above, and in US 5,832,437 and EP 0698876.
The envelope data of the inverse vector quantizer 212 and the pitch and the .V/UV discrimination data from the input terminals *o [R:\LIBQ]423.doc:iad 204, 205 are sent to a noise synthesis circuit 216 configured for noise addition for the voiced portion An output of the noise synthesis circuit 216 is sent to an adder 218 via a weighted overlap-and-add circuit 217. Specifically, the noise is added to the r voiced portion of the LPC residual signals in consideration that, if the excitation as an input to the LPC synthesis filter of the voiced sound is produced by sine wave synthesis, stuffed feeling is produced in the low-pitch sound, such as male speech, and the sound quality is abruptly changed between the voiced sound and the Ic unvoiced sound,' thus producing an unnatural hearing feeling. Such noise takes into account the parameters concerned with speech encoding data, such as pitch, amplitudes of the spectral envelope, maximum amplitude in a frame or the residual signal level, in connection with the LPC synthesis filter input of the voiced speech ly- portion, that is excitation.
A sum output of the adder 218 is sent to a synthesis filter 236 for the voiced sound of the LPC synthesis filter 214 where LPC synthesis is carried out to form time waveform data which then is filtered by a post-filter 238v for the voiced speech and sent to the adder 239.
The. shape index and the gain index, as UV. data from the output terminals 107s, and 107g of Fig.3, are supplied to the input terminals 207s and, 207g of Fig.4, respectively, and thence supplied to the unvoiced speech synthesis unit 220. The shape index from the terminal 207s is sent to the noise codebook 221 of the unvoiced speech synthesis unit 220, while the gain index from the terminal 207g is sent to the gain circuit 222. The representative value output read but from the noise codebook 221 is a noise signal component corresponding to the LPC residuals of the unvoiced y speech. This becomes a pre-set gain amplitude in the gain circuit 222 and is sent .to a windowing circuit 223 so as to be windowed for smoothing the junction to the voiced speech portion.
An output of the windowing circuit 223 is sent to a synthesis filter 237 for the unvoiced (UV) speech of the LPC synthesis filter 1° 214. The data sent to the synthesis filter 237 is processed with LPC synthesis to become time waveform data for the unvoiced portion.
The time waveform data of the unvoiced portion is filtered by a post-filter for the unvoiced portion 238u before being sent to an o. adder 239.
r t In the adder 239, the time waveform signal from the post-filter for the voiced speech 238v and the time waveform data for the unvoiced speech portion from the post-filter 238u for the unvoiced speech are added to each other and the resulting sum data is taken .out at the output terminal 201.
The above-described speech signal encoder can output data of different bit rates depending on the demanded sound quality. That is, the output data can be outputted with variable bit rates. For example, if the low bit rate is 2 kbps and the high bit rate is 6 kbps, the output data is da.ta of the bit rates having the following bit rates shown in Table 1.
9 9 9 9 9 9 9* 9 .9 *99 TABLE I 2 kbps 0 Kops U/V decision output I bit/20 mnsec I bit/20 msec LSP quantization index 32 bits/ 40 msec 48 bits/ 40 msec forvoiedpitch data 8 bits! 20 msec pitch data 8 bits! 20 misec S $pe c trafl %I nve o~p e V Q *Suectraj envlw~ VQ index 15 oits/7 msec in ex 8/ bIts/2 msec, shape (oqrs irst stage), 5 5 shape (f.r first stag 5 bits 2 0/ms~bc b ts2 gain, 5 bi ts/2 msec &a i/ D b I ts! 20 msec inde or econd stage), 72 blt s?2 msec Tm ijO ime d ai VQ for unvoiud Peech index I1 It Ilo msec ine shape (for 1 fir 0 st stage), 7 bits shape for 1 frst stage, 9 bits gain, 4 bits)' 1 msec gain, 6 bit ~y 5 msec shape tor sr,.cond stage, 5 bits gain 3 bPtss5 msec for voiced speech 40 bits! 20 mnsec 120 tits/. 20 msec for unvoiced speech 39 bits/ 20 msec 11 its!' 20 mnsec The pitch data from the output terminal 104 is outputted at all times at a bit rate of 8 bits/ 20 msec for the voiced speech, with the V/UV discrimination output from the output terminal 105 being at all times 1 bit/ 20 msec. The index for LSP quantization, r outputted from the output terminal 102, is switched between 32 bits/ 40 msec and 48 bits/ 40 msec. On the other hand, the index during the voiced speech outputted by the output terminal 103 is switched between 15 bits/ 20 msec and 87 bits/ 20 msec. The index for the unvoiced (UV) outputted from the output terminals to 107s and 107g is switched between 11 bits/ 10 msec and 23 bits/ Smsec. The output data for the voiced sound (UV) is 40 bits/ msec for 2 kbps and 120 kbps/ 20 msec for 6 kbps. On the other hand, the output data for the voiced sound (UV) is 39 bits/ 20 msec S' -for 2 kbps and 117 kbps/ 20 msec for 6 kbps.
The index for LSP quantization, the index for voiced speech and the index for the unvoiced speech (UV) are explained later on in connection with the arrangement of pertinent portions.
Referring to Figs.5 and 6, matrix quantization and vector quantization in the LSP quantizer 134 are explained in detail.
0 The a-parameter from the LPC analysis circuit 132 is sent to an a-LSP circuit 133 for conversion to LSP parameters. If the P- 0* order LPC analysis is, performed in a LPC analysis circuit 132, P a-parameters are calculated. These P a-parameters are converted into LSP parameters which are held in a buffer 610.
The buffer 610 outputs 2 frames of LSP parameters. The two frames of the LSP parameters are matrix-quantized by a matrix quantizer 620 made up of a first matrix quantizer 620i and a second matrix quantizer 6202. The two frames of the LSP parameters are matrix-quantized in the first matrix quantizer 620, and the resulting -quantization error is further matrix-quantized in the second matrix quantizer 6202. The matrix quantization exploit correlation in both the time axis and in the frequency axis. The quantization error for two frames from the matrix quantizer 6202 enters a vector quantization unit 640 made up of a first vector quantizer 640, and c a second vector quantizer 6402. The first vector quantizer 640, is made up of two vector quantization portions 650, 660, while the second vector quantizer 6402 is made up of two vector quantization portions 670, 680. The quantization error from the matrix quantization unit 620 is quantized on the frame basis by the vector I quantization portions 650, 660 of the first vector quantizer 640,.
The resulting quantization error vector is further vector-quantized by the vector quantization portions 670, 680 of the second vector quantizer 6402. The above described vector quantization exploits correlation along the frequency axis.
The matrix quantization unit 620, executing the matrix quantization as described above, includes at least a first matrix quantizer 620, for performing first matrix quantization step and a second matrix quantizer 6202 for performing second matrix quantization step for matrix quantizing the quantization error produced by the first matrix quantization. The vector quantization unit 640, executing the vector quantization as described above, includes at least a first vector quantizer 640, for performing a first vector quantization step and a second vector quantizer 6402 for performing a second matrix quantization step for matrix quantizing the quantization error produced by the first vector quantization.
The matrix quantization and the vector quantization will now be explained in detail.
The LSP parameters for two frames, stored in the buffer 600, that is a 10x2 matrix, is sent to the first matrix quantizer 6201. The Sfirst matrix quantizer 620, sends LSP parameters for two frames via LSP parameter adder 621 to a weighted distance calculating unit 623 for finding the weighted distance of the minimum value.
The distortion measure dMQ, during codebook search by the first matrix quantizer 620, is given by the equation (1) where X, is the LSP parameter and is the quantization value, with t and i being the numbers of the P-dimension.
The weight w, in which weight limitation in the frequency axis Sand in the time axis is not taken into account, is given by the equation w(t,i) x(t,i) x(,i-1) where x(t, 0) 0, x(t, p+1) tc regardless of t.
The weight w of the equation is also used for downstream side matrix quantization and vector quantization.
The calculated weighted distance is sent to a matrix quantizer MQi 622 for matrix quantization. An 8-bit index outputted by this matrix quantization is sent to a signal switcher 690. The quantized value by matrix quantization is subtracted in an adder 621 from the LSP parameters for two frames from the buffer 610. A weighted distance calculating unit 623 calculates the weighted distance every two frames so that matrix quantization is carried out in the matrix quantization unit 622. Also, a quantization value minimizing the weighted distance is selected. An output of the adder 621 is sent to an adder 631 of the second matrix quantizer 6202.
Similarly to the first matrix quantizer 620,, the second matrix quantizer 6202 performs matrix quantization. An output of the adder 621 is sent via adder 631 to a weighted distance calculation unit 633 where the minimum weighted distance is calculated.
The distortion measure dMQ2 during the codebook search by the second matrix quantizer 6202 is given by the equation o I P
MQ
2
(X
2 w(t,i)(x 2 2 1=0 i=1 The weighted distance is sent to a matrix quantization unit
(MQ
2 632 for matrix quantization. An 8-bit index, outputted by matrix quantization, is sent to a signal switcher 690. The weighted distance calculation unit 633 sequentially calculates the weighted distance using the output of the adder 631. The quantization value minimizing the weighted distance is selected. An output of the adder 631 is sent to the adders 651, 661 of the first vector quantizer 640, frame by frame.
The first vector quantizer 640, performs vector quantization frame by frame. An output of the adder 631 is sent frame by frame to each of weighted distance calculating units 653, 663 via adders 651, 661 for .calculating the minimum weighted distance.
o The difference between the quantization error X 2 and the quantization error is a matrix of (10 x If the difference is represented as X 2 X2' [x2, x- the distortion measures d vQ, dvQ 2 during codebook search by the vector quantization units 652, 662 of the first vector quantizer 640, are given by the equations (4) and
P
dQ( 3- 31) E w(0,i)(x 3 1 x'3 2 i= (4)
*P
:*Q
2 2,x-2 '3 3 2 '3 2 i=1 The weighted distance is sent to a vector quantization VQ, 652 and a vector quantization unit VQ, 662 for vector quantization.
Each 8-bit index outputted by this vector quantization is sent to the signal switcher 690. The quantization value is subtracted by the adders 651, 661 from the input two-frame quantization error vector.
The weighted distance calculating units 653, 663 sequentially calculate the weighted distance, using the outputs of the adders 651, 661, for selecting the quantization value minimizing the weighted distance. The outputs of the adders 651, 661 are sent to adders 671, 681 of the second vector quantizer 6402.
The distortion measure dvQ 3 dvQ4 during codebook searching by the vector quantizers 672, 682 of the second vector quantizer 6402, for 2L.-1 X 3.-1 X3.
I
4 2 x 3-2- X 3 2 are given by the equations and
P
6 d.Q( ,4 x- 4-2) w(1,)(x4 2(1 x 4-2(1i)) 2
*(VQ
3 672 and to the vector quantizer
(VQ
4 682 for vector quantization. The 8-bit output index data from vector quantization are subtracted by theadders 671, 681 from the input quantization (7) error vector for two frames. The weighted distance calculating units to 673, 683 sequentially calculate the weighted distances using the outputs of the adders 671, 681 for selecting the quantized value minimizing the weighted distances.
During codebook learning, learning is performed by the general Lloyd algorithm based on the respective distortion measures.
The distortion measures during codebook searching and during f learning may be of different values.
The 8-bit index data from the matrix quantization units 622, 632 and the vector quantization units 652, 662, 672 and 682 are switched by the signal switcher 690 and outputted at an output terminal 691.
c Specifically, for a low-bit rate, outputs of the first matrix quantizer 6201 carrying out the first matrix quantization step, second matrix quantizer 620, carrying out the second matrix quantization step and the first vector quantizer 640, carrying out the first vector quantization step are taken out, whereas, for a high s bit rate, the output for the low bit rate is summed to an output of the second vector quantizer 6402 carrying out the second vector quantization step and the resulting sum is taken out.
This outputs an index of 32 bits/ 40 msec and an index of 48 bits/ 40 msec for 2 kbps and 6 kbps, respectively.
10 The matrix quantization unit 620 and the vector quantization unit 640 perform weighting limited in the frequency axis and/or the time axis in conformity to characteristics of the parameters representing the LPC coefficients.
The weighting limited in the frequency axis in conformity to 2jcharacteristics of the LSP parameters is first explained. If the number of orders P 10, the LSP parameters X(i) are grouped into L, 1 s i 2}
L
2 13 s i 6) L3 j7 i for three ranges of low, mid and high ranges. If the weighting of the groups
L
2 and L3 is 1/4, 1/2 and 1/4, respectively, the weighting limited only in the frequency axis is given by the equations and w x 2 4 wE(i/) S" w(i) x 1 2 :w 'i w(i) 3 w-I) 10 4 E (i) 7 The weighting of the respective LSP parameters is performed in each group only and such weight is limited by the weighting for each group.
Looking in the time axis direction, the sum total of the respective frames is necessarily 1, so that limitation in the time axis direction is frame-based. The weight limited only in the time axis direction is given by the equation (11): w w(i,t) 1 E Ew(,s) j=1 J=0 (11) where 1 i 10 and 0 s t s 1.
By this equation weighting not limited in the frequency axis direction is carried out between two frames having the frame numbers of t 0 and t 1. This weighting limited only in the time axis direction is carried out between two frames processed with matrix quantization.
During learning, the totality of frames used as learning data, having the total number T, is weighted in accordance with the equation (12):
T
E w(i,s) j=1 s=O (12) where 1 i 10 and 0 t T.
The weighting limited in the frequency axis direction and in the time axis direction is explained. If the number of orders P the LSP parameters x(i, t) are grouped into L t)j 1 i s 2, 0 t s 1) L2 3 i s 6, 0 t s 1} L3 t)j 7 s i 10, 0 t 1) for three ranges of low, mid and high ranges. If the weights for the groups LI, L 2 and L 3 ares 1/4, 1/2 and 1/4, the weighting limited only in the frequency axis is given by the equations (14) and w w x 2 1 4 j=1 s=0 (13) w 1 6 1 2 sO w 1 o (14 w w ,O 1 10 1 4 j=7 1=O 1 5 By these equations (13) to weighting limited every three frames in the frequency axis direction and across two frames processed with matrix quantization, are carried out. This is effective both during codebook search and during learning.
During learning, 'weighting is for the totality of frames of the entire data. The L-SP parameters x(i, t) are grouped into S L, t) i 2, 0 t s T} L2 x(i, 3 i 6, 0 t g T} L3 t)l 7 g i 10, 0 t T) for low, mid and high ranges. If the weighting of the groups L, and L 3 is 1/4, 1/2 and 1/4, respectively, the weighting for the groups Li, L 2 and L limited only in the frequency axis, is given by S the equations (17) and (18): w w(i, t) 1 E E wU,s) j=1 s=0 (16) w t) 1 w wxt) 1 6 T 2 E E wU,s) 3 =O S.(17) w(i,t) 1 w x- 10 T 4 •E E U j=7 j=O .(18) By these equations (16) to weighting can be performed o for three ranges in the frequency axis direction and across the S totality of frames in the time axis direction.
In addition, the matrix quantization un-it 620 and the vector quantization unit 640 ,perform weighting depending on the magnitude of changes in the LSP parameters. In V to UV or UV to V transient regions, which represent minority frames among the totality of speech frames, the LSP parameters are changed significantly due to difference in the frequency response between consonants and vowels.
Therefore, the weighting shown by the equation (19) may be multiplied by the weighting t) for carrying out the weighting placing emphasis on the transition regions.
wd() x,(i,t-1) i=1 (19) The following equation wd(t) E x,(it) x -(it-1) i=1 may be used in place of the equation (19).
S* Thus the LSP quantization unit 134 executes two-stage matrix c quantization and two-stage vector quantization to render the number of bits of the output index variable.
The basic structure of the vector quantization unit 116 is shown in Fig.7, while a more detailed structure of the vector quantization unit 116 shown in Fig.7 is shown in Fig.8. An i° illustrative structure of weighted vector quantization for the spectral envelope Am in the vector quantization unit 116 is now explained.
First, in the speech signal encoding device shown in Fig.3, an illustrative arrangement for data number conversion for providing Ic a constant number of data of the amplitude of the spectral envelope on an output side of the spectral evaluating unit 148 or on an input side of the vector quantization unit 116 is explained.
A variety of methods may be conceived for such data number conversion. In the present embodiment, dummy data interpolating the values from the last data in a block to the first data in the Sblock, or pre-set data such as data repeating the last data or the first data in a block, are appended to the amplitude data of one block of an effective band on the frequency axis for enhancing the number of data to NF, amplitude data equal in number to Os times, such as eight times, are found by Os-tuple, such as octatuple, to oversampling of the limited bandwidth type. The ((mMx 1) x Os) amplitude data are linearly interpolated for expansion to a larger NM number, such as 2048. This NM data is sub-sampled for conversion to the above-mentioned pres-set number M of data, such as 44 data.
In effect, only data necessary for formulating M data ultimately t required is calculated by oversampling and linear interpolation without finding all of the above-mentioned NM data.
The vector quantization unit 116 for carrying out weighted vector quantization of Fig.7 at least includes a first vector quantization unit 500 for performing the first vector quantization 1w step and a second vector quantization unit 510 for carrying out the second vector quantization step for quantizing the quantization error vector produced during the first vector quantization by the first vector quantization unit 500. This first vector quantization unit 500 is a so-called first-stage vector quantization unit, while the second is vector quantization unit 510 is a so-called second-stage vector quantization unit.
An output vector x of the spectral evaluation unit 148, that is envelope data having a pre-set number M, enters an input terminal 501 of the first vector quantization unit 500. This output vector x Sis quantized with weighted vector quantization by the vector quantization unit 502. Thus a shape index outputted by the vector quantization unit 502 is outputted at an output terminal 503, while a quantized value is outputted at an output terminal 504 and sent to adders 505, 513. The adder 505 subtracts the quantized o value from the source vector x to give a multi-order quantization error vector y.
The quantization error vector y is sent to a vector quantization unit 511 in the second vector quantization unit 510.
This second vector quantization unit 511 is made up of plural vector quantizers, or two vector quantizers 5111, 5112 in Fig.7.
The quantization error vector y is dimensionally split so as to be quantized by weighted vector quantization in the two vector quantizers 511,, 5112. The shape index outputted by these vector quantizers 511,, 5112is outputted at output terminals 512 1, 512 2 while the quantized values y2,' are connected in the dimensional direction and sent to an adder 513. The adder 513 adds the quantized values 2 to the quantized value to generate a quantized value which is outputted at an output terminal 514.
Thus, for the low bit rate, an output of the first vector quantization step by the first vector quantization unit 500 is taken out, whereas, for the high bit rate, an output of the first vector quantization step and an output of the second quantization step by the second quantization unit 510 are outputted.
Specifically, the vector quantizer 502 in the first vector quantization unit 500 in the vector quantization section 116 is of an L-order, such as 44-dimensional two-stage structure, as shown in Fig.8.
That is, the sum of the output vectors of the 44-dimensional vector quantization codebook with the codebook size of 32, tc multiplied with a gain gi, is used as a quantized value of the 44dimensional spectral envelope vector x. Thus, as shown in Fig.8, the two codebooks are CBO and CB1, while the output vectors are sii, si j, where 0 i and j 31. On the other hand, an output of the gain codebook CB, is where 0 1 31, where gis a scalar. An Lr ultimate output is g, (si sl).
The spectral envelope Am obtained by the above MBE analysis of the LPC residuals and converted into a pre-set dimension is x.
is crucial how efficiently x is to be quantized.
The quantization error energy E is defined by E II W (Hx Hgl(( i 12 II WH {x {x g,(soi 11 .(21) where H denotes characteristics on the frequency axis of the LPC synthesis filter and W a matrix for weighting for representing characteristics for perceptual weighting on the frequency axis.
If the a-parameter by the results of LPC analyses of the current frame is denoted as ai (1 i the values of the Ldimension, for example, 44-dimension corresponding points, are sampled from the frequency response of the equation (22): 1 H(z)=
P
1 a z-i i=1 (22) For calculations, Os are stuffed next to a string of 1, a a2, cp to give a string of 1, a 1 a a, 0,0, 0 to give e.g., 256-point data. Then, by 256-point FFT, (r,2 im 2 2 are calculated for points associated with a range from 0 to t and the reciprocals of the results are found. These reciprocals are sub-sampled to L points, such as 44 points, and a matrix is formed having these L points as diagonal elements: h( 1 0 h(2) H 0 h(L) A perceptually weighted matrix W is given by the equation Y (23):
P
1 E i
P
W(z) 1 i= (23) where a i is the result of the LPC analysis, and Xa, Ab are constants, such that Xa 0.4 and Ab 0.9.
The matrix W may be calculated from the frequency response of the above equation For example, FFT is executed on 256point data of 1, alXb, a2 lb 2 cap.Ab, 0, 0, 0 to find Im 2 for a domain from 0 to T, where 0 i s 128. The frequency response of the denominator is found by 256-point FFT for a domain from 0 to 7 for 1, alIa, a2Xa 2 ap.a
P
0, 0, at 128 points to find (re' 2 2 where 0 i s 128.
e.ee The frequency response of the equation 23 may be found by 2 [i im [i] re'2[i] im', 2 [i] o[i] where 0 s i 128. This is found for each associated point of, for example, the 44-dimensional vector, by the following method. More precisely, linear interpolation should be used. However, in the following example, the closest point is used instead.
That is, o[i] oO [nint{128i where 1 i L.
In the equation nint(X) is a function which returns a value closest to X, As for H, are found by a similar method.
That is, h(l) 0 W(1) 0 H h(2) Ww(2) 0 0 W(L)j h(1)w(1) 0 WH h(2)w(2) 0 h(L)w(L)_ (24) As another example, H(z)W(z) is first found and the frequency *****response is then found for decreasing the number of times of FFT.
*That is, the denominator of the equation X1' b H(z) W(z) P 1 Cez' EaX zi is expanded to P P 2P (1 az a 256-point data, for example, is produced by using a string of 1, P,, P2, 32p, 0, 0. Then, 256-point FFT is executed, with the frequency response of the amplitude being rms[i] re"[i] im" 2 where 0 s i 128. From this, wh[i] re[i] im 2 [i] re" 2 im" 2 [i] where 0 i 128. This is found for each of corresponding points of the L-dimensional vector. If the number of points of the FFT is small, linear interpolation should be used. However, the closest value is herein is found by: 1 i L. If a matrix having these as diagonal elements is
W',
wh(1) 0 W' wh(2) wh(L) (26)
Y
The equation (26) is the same matrix as the above equation (24).
Alternatively, H(exp(j ))W(exp(j may be directly calculated from the equation (25) with respect to o i17, where 1 i so as to be used for wh[i].
Alternatively, a suitable length, such as 40 points, of an impulse response of the equation (25) may be found and FFTed to find the frequency response of the amplitude which is employed.
The method for reducing the volume of processing in calculating characteristics of a perceptual weighting filter and an LPC synthesis filter is explained.
H(z)W(z) in the equation (25) is that is, o 0(z) H(z)W(z)
P
1 E aiz i P P 1 az-' 1 E aAz' I il I (a 1) g in order to find the impulse response of Q(z) which is set to q(n), with 0 s n Limp, where Limp is an impulse response length and, for *o example, Limp In the present embodiment, since P 10, the equation (al) represents a 20-order infinite impulse response (IIR) filter having 30 coefficients. By approximately Limp x 3P 1200 sum-of-product operations, Limp samples of the impulse response q(n) of the equation (al) maybe found. By stuffing Os in where 0 2 n 2 m is produced. If, for example, m 7, 2 m Lip 128 88 Os are appended to q(n) (0-stuffing) to provide This is FFTed at 2" (=128 points). The real and imaginary parts of the result of FFT are re[i] and im[i], respectively, where 0 is 2 m 1. From this, rm[i] ere 2 im 2 [i] (a2) r This is the amplitude frequency response of represented by 2-" points. By linear interpolation of neighboring values of rm[i], the frequency response is represented by 2' points. Although higher order interpolation may be used in place of linear interpolation, the processing volume is correspondingly increased.If an array obtained to by such interpolation is wlpc[i], where 0 s i g 2", wplpc[2i] rm[i], where 0 i 2 m (a3) wlpc[2i+l] where 0 i s 2" (a4) This gives wlpc[i], where 0 s i s 2" 1 From this, wh[i] may be derived by wh[i] wlpc [nint(l281i/L)], where 1 i where nint(x) is a function which returns an integer closest to x.
The indicates that, by executing one 128-point FFT operation, W' of the equation (26) may be found by executing one 128-point FFT operation.
The processing volume required for N-point FFT is generally (N/2)log 2 N complex multiplication and Nlog 2 N complex addition, which is equivalent to (N/2)log 2 N x 4 real-number multiplication and NlogN x 2 real-number addition.
I' By such method, the volume of the sum-of-product operations for finding the above impulse response q(n) is 1200. On the other hand, the processing volume of FFT for N 2 7 128 is approximately 128/2 x 7 x 4 1792 and 128 x 7 x 2 1792. If the number of the sum-of-product is one, the processing volume is io approximately 1792. As for the processing for the equation the square sum operation, the processing volume of which is approximately 3, and the square root operation, the processing volume of which is approximately 50, are executed 2m" 1 26 64 times, so that the processing volume for the equation (a2) is o* i" 64 x (3 50) 3392.
On the other hand, the interpolation of the equation (a4) is on the order of 64 x 2 128.
Thus, in sum total, the processing volume is equal to 123D 1792 3392 128 6512.
Since the weight matrix W is used in a pattern of W'W, only rm 2 may be found and used without executing the processing for square root. In this case, the above equations (a3) and (a4) are executed for rm 2 instead of for rm[i], while it is not wh[i] but wh 2 that.is found by the above equation The processing s volume for finding rm 2 in this case is 192, so that,. in sum total, the processing volume becomes equal to 1200 1792 192 128 3312.
If the processing from the equation (25) to the equation (26) is executed directly, the sum total of the processing volume is on S the order of approximately 2160. That is, 256-point FFT is executed for both the numerator and the denominator of the equation This 256-point FFT is on the order of 256/2 x 8 x 4 4096. On the other hand, the processing for who[i] involves two square sum operations, each having the processing volume of 3, division having \o the processing volume of approximately 25 and square sum operations, with the processing volume of approximately 50. If the square root calculations are omitted in a manner as described above, the processing volume is on the order of 128 x (3 3 3968. Thus, in sum total, the processing volume is equal to 4096 i\ x 2 3968 12160.
Thus, if the above equation (25) is directly calculated to find who 2 in place of wh 0 the processing volume of the order of 12160 is required, whereas, if the calculations from the equations (al) to a(5) are executed, the processing volume is reduced to 2 approximately 3312, meaning that the processing volume may be reduced to one-fourth.The weight calculation procedure with the reduced processing volume may be summarized as shown in a flowchart of Fig.9, Referring to Fig.9, the above equation (al) of the weight Zr transfer function is derived at the first step S91 and, at the next step S92, the impulse response of (al) is derived. After 0-appending (0 stuffing) to this impulse response at step S93, FFT is executed at step S94. If the impulse response of a length equal to a power of 2 is derived, FFT can be executed directly without 0 stuffing. At 3 the next step S95, the frequency characteristics of.the amplitude or the square of the amplitude are found. At the next step S96, linear interpolation is executed for increasing the number of points of the frequency characteristics.
These calculations for fining the weighted vector quantization Scan be applied not only to speech encoding but also to encoding of audible signals, such as audio signals. That is, in audible signal encoding in which the speech or audio signal are represented by DFT coefficients, DCT coefficients or MDCT coefficients, as frequency-domain parameters, or parameters derived from these C parameters, such as amplitudes of harmonics or amplitudes of harmonics of LPC residuals, the parameters may be quantized by weighted vector quantization by FFTing the impulse response of the 4 weight transfer function or the impulse response interrupted partway Jo and stuffed with Os and calculating the weight based on the results of the FFT. It is preferred in this case, that, after FFTing the weight impulse response, the FFT coefficients themselves, (re, im) where re and im represent real and imaginary parts of the coefficients, respectively, re 2 im 2 or (re 2 im 2 "2 be interpolated and used as the weight.
s -r If the equation (21) is rewritten using the matrix W' of the above equation that is the frequency response of the weighted synthesis filter, we obtain: E IIWk'( gk(+ s)) The method for learning the shape codebook and the gain I' codebook is explained.
The expected value of the distortion is minimized for all frames k for which a code vector sO0 is selected for CBO. If there are M such frames, it suffices if
MI
(28) [i is minimized. In the equation Wk', Xk, gk and sik denote the weighting for the k'th frame, an input to the k'th frame, the gain of the k'th frame and an output of the codebook CBI for the k'th *frame, respectively.
Sm t For minimizing the equation (28), Akl kOC I k k k Oc 1) i fX{Wk'TWk/ak- 2g- I~k Mk~kkk 2gk (ST+ 'YIWkITWkIyk
XTWI
5 +2gk Wk T W I TW Ix1 k 29kS (29) SMk I k1k )k Hence, (gkW-' TWk k Wk"S W9' gWk'TWkS,) k=1 k=1 so that (3 1) where denotes an inverse matrix and. Wk T denotes a transposed matrix of Wk.- Next, gain optimization is considered.
The expected value of the distortion concerning the k'th frame selecting the code word gc of the gain is given by: J zEIW'('K- gl('E sid' g E k k Ok 1A Mk=1kkkX-~~ g2~~ T T ITWk1( Solving E 1 -2{xTWk1TWI+d ag, M k=1 kkkO -2gC(Sj T )T W, k'(12 Id)= 0 we obtain EX TwkwiI+5 T TW M I) kd kjsak kk Ok i and yT"Wk'W s)d 9Ck=kkO E( T+ IT T 1 k Id k' O' k k (32) The above equations (31) and (3 2) give optimum centroid conditions for the shape s.j sj, and the gain g 1 for 0 :g i 3 31, 0 j :g 3 1 and 0 1 5 31, that is an optimum decoder output.
Meanwhile, si may be found in the same way as for The optimum encoding condition, that is the nearest neighbor condition, is considered.
The above equation (27) for finding the distortion measure, that is si and s.li minimizing the equation E (X gl(-i sj))ll, are found each time the input x and the weight matrix W' are given, that is on the frame-by-frame basis.
Intrinsically, E is found on the round robin fashion for all combinations of gl (0 1 31), si (0 i s 31) and soj (0 j to 31), that is 32x32x32 32768, in order to find the set of s-ai, si which will give the minimum value of E. However, since this requires voluminous calculations, the shape and the gain are sequentially searched in the present embodiment. Meanwhile, round robin search is used for the combination of sO, and s- 1 There are 32x32 1024 combinations for soand In the following description, sL sj are indicated as sm for simplicity.
The above equation (27) becomes E IIW'(x glsm)lI 2 If, for further simplicity, x. W'x and s- W' s, we obtain E IIX, gSA j (33) E IP \Is ?I g,
W
-w It sIi IF IIS IF Therefore, if gl can be made sufficiently accurate, search can be performed in two steps of searching for s, which will maximize
(I
T 2 w and searching for g4 which is closest to
T.
w w If the above is rewritten using the original notation, searching is made for a set of soiand s-i which will maximize (XTW'W'(Io+ SlJ) 3 and searching is made for g, which is closest to TW'((s s) IIW'(so, s)IP The above equation (35) represents an optimum encoding condition (nearest, neighbor condition).
Using the conditions (centroid conditions) of the equations (31) and (32) and the condition of the equation codebooks (CBO, CB and CBg) can be trained simultaneously with the usee of the so-called generalized Lloyd algorithm (GLA).
In the present embodiment, W' divided by a norm of an input x is used as W That is, W Ilx.ll is substituted for W' in the r equations (32) and Alternatively, the weighting used for perceptual weighting at the time of vector quantization by the vector quantizer 116, is defined by the above equation However, the weighting W' taking into account the temporal masking can also be found by (k finding the current weighting W' in which past W' has been taken into account.
The values of wh(l), wh(2), wh(L) in the above equation as found at the time n, that is at the n'th frame, are indicated as whn(l), whn(2), whn(L), respectively.
If the weights at time n, taking past values into account, are defined as An(i), where 1 i L, An(i) AA,.i(i) (1 whn(i), (whn(i) whn(i), (whn(i) where may be set to, for example, A 0.2. In An(i), with 1 i 1< L, thus found, a matrix having such An(i) as diagonal elements may be used as the above weighting.
The shape index'values sei, sj, obtained by the weighted vector quantization in thi's manner, are outputted at output terminals 520, 522, respectively, while the gain index gl is outputted at an output terminal 521. Also, the quantized value x is outputted at the .output terminal 504, while being sent to the adder 505.
The adder 505 subtracts the quantized value from the spectral envelope, vector x to .generate a quantization error vector y.
Specifically, this quantization error vector y. is sent to the vector quantization unit 511 so as to be dimensionally split and quantized by vector quantizers 511, to 511, with weighted vector quantization.
The second vector quantization unit 510 uses a larger number of bits than the first vector quantization unit 500. Consequently, the memory capacity of the codebook and the processing volume to (complexity) for codebook searching are increased significantly.
Thus it becomes impossible to carry out vector quantization with the 44-dimension which is the same as that of the first vector quantization unit 500. Therefore, the vector quantization unit 511 S "in the second vector quantization unit 510 is made up of plural vector quantizers and the input quantized values are dimensionally split into plural low-dimensional vectors for performing weighted vector quantization.
The relation between the quantized values y to used in the vector quantizers 511, to 511 the number of dimensions and the a number of bits are shown in the following Table 2.
TABLE 2 quantized value dimension number of bits Y-0 4 Y-2 4 -34 Y4 9 I8 8 8 Y-7 8 7 The index values Id,,o to Idv,, outputted from the vector quantizers 5111 to 511, are outputted at output terminals 523 to 523,. The sum of bits of these index data is 72.
If a value obtained by connecting the output quantized values Yo' to Y-7' of the vector quantizers 511 ,to 511 in the dimensional direction is the quantized values and. x'are summed by the adde- 513 to give a quantized value Therefore, the quantized value x 1 is represented by X-1' xo 0
Y-
2Lx_ y. That is, the ultimate quantization error vector is If the quantized value from the second vector quantizer 510 is to be decoded, the speech signal decoding apparatus is not in need of the quantized value from the first quantization unit 500.
However, it is in need of index data from the first quantization unit 500 and the second quantization unit 510.
The learning method and code book search in the vector quantization section 511 will be hereinafter explained.
i As for the learning method, the quantization error vector y is divided into eight low-dimension vectors Y to using the weight as shown in Table 2. If the weight W' is a matrix having 44point sub-sampled values as diagonal elements: wh(l) 0 W' wh(2) 0 wh(44) (36) G the weight W' is split into the following eight matrices: wh(1) 0
I
0 wh(4) wh(5) 0 2' 0 -wh(8) .o W3 0 wh(12) wh(l 3) 0 4' 0 wh(1 6).
wh(17) 0 WI 0 wh(2 1) 0 6' o wh(28).
=wh(29) 0 W7' 0 wh(36).
wh(3 7) 0 *0 wh(44) y. and WI, thus split in low dimensions, are termed Y, and Wi, *where 1 :5 i :5 8, respectively.
The distortion rneasure E is defined as E JJW i' )I 2 (37) (0 The cod ebook vector s is the result of quantization of Such code vector of the codebook minimizing the distortion measure E is searched.
In the codebook learning, further weighting is performed using the general Lloyd algorithm (GLA). The optimum centroid condition for learning is first explained. If there are M input vectors y which have selected the code vector a as optimum quantization results, and the training data is yk, the expected value of distortion J is given by the equation (38) minimizing the center of distortion on weighting with respect to all frames k: i0 j_1 i IIw' )IP M k-I M (Y k s)TWk'Wk'(Yk-
S)
M k-i
STWTW
(38) Solving w W,k, 2WkTW,) 0 a:s M k- 1 we obtain k=1 k=1 Taking transposed values of both sides, we obtain Ad M E W k Wk E k kW k=1 k=1 Therefore, Tk k Wk k kk k=1 k=1l (39) In the above equation s is an optimum representative vector and represents an optimum centroid condition.
As for the optimum encoding condition, it suffices to search for s minimizing the value of (y s)11 2 during searching need not be the same as W i during learning and may be nonweighted matrix: 1 0 1 0 1 By constituting the vector quantization unit 116 in the speech signal encoder by two-stage vector quantization units, it becomes possible to render the number of output index bits variable.
The second encoQing unit 120 employing the above-mentioned CELP encoder constitution of the present invention, is comprised of multi-stage vector quantization processors as shown in Fig.9. These multi-stage vector quantization processors are formed as two-stage encoding units 1201, 1202 in the embodiment of Fig.9, in which an arrangement for coping with the transmission bit rate of 6 kbps in case the transmission bit rate can be switched between 2 kbps and 6 kbps, is shown. In addition, the shape and gain index output .t can be switched between 23 bits/ 5 msec and 15 bits/ 5 msec. The processing flow in the arrangement of Fig.10 is shown in Fig.1.
Referring to Fig.10, a first encoding unit 300 of Fig.10 is equivalent to the first encoding unit 113 of Fig.3, an LPC analysis circuit 302 of Fig.10 corresponds to the LPC analysis circuit 132 o shown in Fig.3, while an LSP parameter quantization circuit 303 corresponds to the constitution from the a to LSP conversion circuit 133 to the LSP to a conversion circuit 137 of Fig.3 and a perceptually weighted filter 304 of Fig.10 corresponds to the perceptual weighting filter calculation circuit 139 and the s perceptually weighted filter 125 of Fig.3. Therefore, in Fig.10, an output which is the same as that of the LSP to a conversion circuit .o 137 of the first encoding unit 113 of Fig.3 is supplied to a terminal 305, while an output which is the same as the output of the perceptually weighted filter calculation circuit 139 of Fig.3 is 1.c supplied to a terminal 307 and an output which is the same as the output of the perceptually weighted filter 125 of Fig.3 is supplied to a terminal 306. However, in distinction from the perceptually weighted filter 125, the perceptually weighted filter 304 of generates the perceptually weighed signal, that is the same signal 2( as the output of the perceptually weighted filter 125 of Fig.3, using the input speech data and pre-quantization a-parameter, instead of using an output of the LSP-a conversion circuit 137.
In the two-stage second encoding units 120, and 1202, shown in Fig.10, subtractors 313 and 323 correspond to the subtractor 123 of Fig.3, while the distance calculation circuits 314, 324 correspond to the distance calculation circuit 124 of Fig.3. In addition, the gain circuits 311, 321 correspond to the gain circuit 126 of Fig.3, while stochastic codebooks 310, 320 and gain codebooks 315, 325 correspond to the noise codebook 121 of Fig.3.
io In the constitution of Fig.10, the LPC analysis circuit 302 at step Sl of Fig.10 splits input speech data x supplied from a terminal 301 into frames as described above to perform LPC analyses in order to find an a-parameter. The LSP parameter I' quantization circuit 303 converts the a-parameter from the LPC S.o" analysis circuit 302 into LSP parameters to quantize the LSP o parameters. The quantized LSP parameters are interpolated and converted into a-parameters. The LSP parameter quantization circuit 303 generates an LPC synthesis filter function 1/H from the aparameters converted from the quantized LSP parameters, that is the 13 quantized LSP parameters, and sends the generated LPC synthesis filter function 1/H to a perceptually weighted synthesis filter 312 of the first-stage, second encoding unit 120, via terminal 305.
The perceptual weighting filter 304 finds data for perceptual weighting, which is the same as that produced by the perceptually -x weighting filter calculation circuit 139 of Fig.3, from the aparameter from the LPC analysis circuit 302, that is prequantization a-parameter. These weighting data are supplied via terminal 307 to the perceptually weighting synthesis filter 312 of the first-stage second encoding unit 1201. The perceptual weighting filter 304 generates the perceptually weighted signal, which is the same signal as that outputted by the perceptually weighted filter 125 of Fig.3, from the input speech data and the pre-quantization a-parameter, as shown at step S2 in Fig.10. That is, the LPC synthesis filter function W is first generated from the preo quantization a-parameter. The filter function W(z) thus generated is applied to the input speech data x to generate xw which is supplied as the perceptually weighted signal via terminal 306 to the subtractor 313 of the first-stage second encoding unit 1 2 0 I n the first-stage second encoding unit 120,, a representative value If output of the stochastic codebook 310 of the 9-bit shape index output is sent to the gain circuit 311 which then multiplies the representative output from the stochastic codebook 310 with the gain (scalar) from the gain codebook 315 of the 6-bit gain index output. The representative value output, multiplied with the gain by 2o the gain circuit 311, is sent to the perceptually weighted synthesis filter 312 with 1/A(z) The weighting synthesis filter 312 sends the, 1/A(z) zero-input response output to the subtractor 313, as indicated at step S3 of Fig.l1. The subtractor 313 performs subtraction on the zero-input response output of the 2. perceptually weighting synthesis filter 312 and the perceptually weighted signal .w from the perceptual weighting filter 304 and the resulting difference or error is taken out as a reference vector r.
During searching at the first-stage second encoding unit 120,, this reference vector r is sent to the distance calculating circuit 314 S_ where the distance is calculated and the shape vector s and the gain g minimizing the quantization error energy E are searched, as shown at step S4 in Fig.11. Here, 1/A(z) is in the zero state. That is, if the shape vector s in the codebook synthesized with 1/A(z) in the zero state is the shape vector s and the gain g minimizing the (0 equation
N-I
E E gsn(n)) n=O are searched.
Although s and g minimizing the quantization error energy E may be full-searched, the following method may be used for s reducing the amount of calculations.
The first method is to search the shape vector s minimizing E, defined by the following equation (41): N-i E -0 (V-1 s,(n) 2 1 n,0 (4 1) From s obtained by the first method, the ideal gain is as shown by the equation (42): N-1 E r(n)s(n) n=0 gref
N-
Es(n) 2 n=O (42) Therefore, as the second method, such g minimizing the equation (43): Eg (gr.f g) (43) is searched.
Since E is a quadratic function of g, such g minimizing Eg minimizes E.
o From s and g obtained by the first and second methods, the quantization error vector e can be calculated by the following equation (44): ooo* (44) This is quantized as a reference of the second-stage second [1 encoding unit 1202 as, in the first stage.
That is, the signal supplied to the terminals 305 and 307 are directly supplied from the perceptually weighted synthesis filter 312 of the first-stage second encoding unit 120, to a perceptually -;weighted synthesis filter 322 of the second stage second encoding -nit 1202. The quantization error vector e found by the first-stage second encoding unit 120; is supplied to a subtractor 323 of the second-stage second encoding unit 1202.
At step S5 of Fig.11, processing similar to that performed in the first stage occurs in the second-stage second encoding unit 120, is performed. That is, a representative value output from the stochastic codebook 320 of the 5-bit shape index output is sent to the gain circuit 321 where the representative value output of the *o codebook 320 is multiplied with the gain from the gain codebook 325 of the 3-bit gain index output. An output of the weighted synthesis filter 322 is sent to the subtractor 323 where a difference between the output of the perceptually weighted synthesis filter 322 and the first-stage quantization error vector e. is found. This difference is sent to a distance calculation circuit 324 for distance calculation in order to search the shape vector s and the gain g minimizing the quantization error energy E.
The shape index output of the stochastic codebook 310 and the gain index output of the gain codebook 315 of the first-stage 2o second encoding unit 120, and the index output of the stochastic .codebook 320 and the index output of the gain codebook 325 of the second-stage second epcoding unit 1202 are sent to an index output switching circuit 330. If 23 bits are outputted from the second encoding unit 120, the index data of the stochastic codebooks 310, L" 320 and the gain codebooks 315, 325 of the first-stage and secondstage second encoding units 1201, 1202 are summed and outputted.
If 15 bits are outputted, the index data of the stochastic codebook 310 and the gain codebook 315 of the first-stage second encoding unit 120, are outputted.
The filter state is then updated for calculating zero-input response output as shown at step S6.
In the present embodiment, the number of index bits of the second-stage second encoding unit 1202 is as small as 5 for the shape vector, while that for the gain is as small as 3. If suitable to shape and gain are not present in this case in the codebook, the quantization error is likely to be increased, instead of being decreased.
Although 0 may be provided in the gain for preventing this S: problem from occurring, there are only three bits for the gain. If one of these is set to 0, the quantizer performance is significantly deteriorated. In this consideration, all-O vector is provided for the shape vector to which a larger number of bits have been allocated.
The above-mentioned search is performed, with the exclusion of the all-zero vector, and the all-zero vector is selected if the quantization error has ultimately been increased. The gain is arbitrary. This makes it.possible to prevent the quantization error from being increased ip the second-stage second encoding unit 120,.
Although the ,two-stage arrangement has been described above, the number of stages may be larger than 2. In such case, if the 2I vector quantization by the first-stage closed-loop search has come to a close, quantization of the N'th stage, where 2 N, is carried out with the quantization error of the (N-1)st stage as a reference input, and the quantization error of the of the N'th stage is used as a reference input to the (N+l)st stage.
It is seen from Figs. 10 and 11 that, by employing multi-stage vector quantizers for the second encoding unit, the amount of calculations is decreased as compared to that with the use of straight vector quantization with the same number of bits or with the use of a conjugate codebook. In particular, in CELP encoding to in which vector quantization of the time-axis waveform employing the closed-loop search by the analysis by synthesis method is performed, a smaller number of times of search operations is crucial. In addition, the number of bits can be easily switched by switching between employing both index outputs of the two-stage second encoding units 1201, 1202 and employing only the output of the first-stage second encoding unit 120, without employing the output of the second-stage second encoding unit 120,. If the index outputs of the first-stage and second-stage second encoding units 1201, 1202 are combined and outputted, the decoder can easily cope with the configuration by selecting one of the index outputs. That is, the decoder can easily cope with the configuration by decoding the parameter encoded with 6 kbps using a decoder operating at 2 kbps. In addition, if zero-vector is contained in the shape codebook of the second-stage second encoding unit 1202, it becomes ,j possible to prevent the quantization error from being increased with lesser deterioration in performance than if 0 is added to the gain.
The code vector of the stochastic codebook (shape vector) can be generated by, for example, the following method.
The code vector of the stochastic codebook, for example, can -F be generated by clipping the so-called Gaussian noise. Specifically, the codebook may be generated by generating the Gaussian noise, clipping the Gaussian noise with a suitable threshold value and normalizing the clipped Gaussian noise.
However, there are a variety of types in the speech. For |o example, the Gaussian noise can cope with speech of consonant sounds close to noise, such as "sa, shi, su, se and so", while the Gaussian noise cannot cope with the speech of acutely rising consonants, such as "pa, pi, pu, pe and po".
According to the present invention, the Gaussian noise is S-r applied to some of the code vectors, while the remaining portion of the code vectors is dealt with by learning, so that both the consonants having sharply rising consonant sounds and the consonant sounds close to the noise can be coped with. If, for example, the threshold value is increased, such vector is obtained to which has several larger peaks, whereas, if the threshold value is decreased, the code vector is approximate to the Gaussian noise.
Thus, by increasing th,e variation in the clipping threshold value, it becomes possible, to cope with consonants having sharp rising 9999 portions, such as "pa, pi, pu, pe and po" or consonants close to zr noise, such as "sa, shi, su, se and so", thereby increasing clarity.
Fig.11 shows the appearance of the Gaussian noise and the clipped noise by a solid line and by a broken line, respectively. Figs.12A and 12B show the n.oise with the clipping threshold value equal to that is with a larger threshold value, and the noise with the J clipping threshold value equal to 0.4, that is with a smaller threshold value. It is seen from Figs.12A and 12B that, if the threshold value is selected to be larger, there is obtained a vector having several larger peaks, whereas, if the threshold value is selected to a smaller value, the noise approaches to the Gaussian 1i noise itself.
For realizing this, an initial codebook is prepared by clipping the Gaussian noise and a suitable number of non-learning code vectors are set. The non-learning code vectors are selected in the order of the increasing variance value for coping with consonants ir close to the noise, such as "sa, shi, su, se and so". The vectors found by learning use the LBG algorithm for learning. The encoding under the nearest neighbor condition uses both the fixed code vector and the code vector obtained on learning. In the centroid condition, only the code vector to be learned is updated. Thus the code vector
L
o to be learned can cope with sharply rising consonants, such as "pa, a. •o pi, pu, pe and po".
An optimum gaiji may be learned for these code vectors by usual learning.
Fig.13 shows the processing flow for the constitution of the lz "codebook by clipping the Gaussian noise.
In Fig.13, the number of times of learning n is set to n 0 at step S10 for initialization. With an error Do the maximum number of times of learning nm,, is set and a threshold value E setting the learning end condition is set.
At the next step S 1, the initial codebook by clipping the Gaussian noise is generated. At step S12, part of the code vectors is fixed as non-learning code vectors.
At the next step S13, encoding is done sing the above codebook. At step S14, the error is calculated. At step S15, it is c judged if D/ D, e, or n n If the result is YES, processing is terminated. If the result is NO, processing transfers to step S16.
At step S16, the code vectors not used for encoding are processed. At the next step S17, the code books are updated. At step S18, the number of times of learning n is incremented before returning to step S13.
o** In the speech encoder of Fig.3, a specified example of a voiced/unvoiced (V/UV) discrimination unit 115 is now explained.
*The V/UV discrimination unit 115 performs V/UV .o discrimination of a frame in subject based on an output of the orthogonal transform circuit 145, an optimum pitch from the high precision pitch search unit 146, spectral amplitude data from the spectral evaluation.unit 148, a maximum normalized autocorrelation value r(p) from the open-loop pitch search unit 141 and a zerotL'crossing count value from the zero-crossing counter 412. The boundary position of the band-based results of V/UV decision, similar to that used for MBE, is also used as one of the conditions for the frame in subject.
The condition for V/UV discrimination for the MBE, employing Sthe results of band-based V/UV discrimination, is now explained.
The parameter or amplitude representing the magnitude of the m'th harmonics in the case of MBE may be represented by b. b, A,.I h S(j)IJ E(J)I/ j JE(f\ 2 p.o In this equation, IS(j)| is a spectrum obtained on DFTing LPC residuals, and IE(j)| is the spectrum of the basic signal, specifically, a 256-point Hamming window, while a bm are lower and upper limit values, represented by an index j, of the frequency corresponding to the m'th band corresponding in turn to the m'th harmonics. For band-based V/UV discrimination, a noise to signal iS- ratio (NSR) is used. The NSR of the m'th band is represented by E s(i) IAJIE()l 2 NSR p".
If the NSR value is larger than a re-set threshold, such as 0.3, that is if an error is larger, it may be judged that approximation of IS(j)| by [Am, in the band in subject is not good, that is that the excitation signal JE(j)| is not appropriate as the base. Thus the band in subject is determined to be unvoiced If otherwise, it may be judged that approximation has been done fairly well and hence is determined to be voiced S• It is noted that the NSR of the respective bands (harmonics) represent similarity of the harmonics from one harmonics to another.
The sum of gain-weighted harmonics of the NSR is defined as NSR,,.
by: NSRai (:,mIAmJNSR jA 1) o The rule base used for V/UV discrimination is determined depending on whether this spectral similarity NSR, 1 is larger or smaller than a certain threshold value. This threshold is herein set to ThNsR 0.3. This rule base is concerned with the maximum value S of the autocorrelation of the LPC residuals, frame power and the -zero-crossing. In the case of the rule base used for NSRi,, ThNsR, the frame in subject becomes V and UV if the rule is applied and if there is no applicable rule, respectively.
A specified rule is as follows: For NSR,, THNsR, if numZero XP 24, frmPow 340 and rO 0.32, then the frame in subject is V; For NSR,,, 2 THNSR, If numZero XP 30, frmPow 900 and rO 0.23, then the frame in subject is UV; lwherein respective variables are defined as follows: numZeroXP number of zero-crossings per frame frmPow frame power r0 maximum value of auto-correlation The rule representing a set of specified rules such as those given above are consulted for doing V/UV discrimination.
The constitution of essential portions and the operation of the speech signal decoder of Fig.4 will be explained in more detail.
The LPC synthesis filter 214 is separated into the synthesis o filter 236 for the voiced speech and into the synthesis filter 237 for the voiced speech as previously explained. If LSPs are continuously interpolated every 20 samples, that is every 2.5 msec, without separating the synthesis filter without making V/UV distinction, LSPs of totally different properties are interpolated at V to UV or UV to V transient portions. The result is that LPC of UV and V are used as residuals of V and UV, respectively, such that strange sound tends to be produced. For preventing such ill effects from occurring, the LPC synthesis filter is separated into V and UV and LPC coefficient interpolation is independently 1j performed for V and UV.
The method. for coefficient interpolation of the LPC filters 236, 237 in this case is now explained. Specifically, LSP interpolation is switched depending on the V/UV state, as shown in Table 3.
TABLE 1 H(v)z Huv(z) previous current previous current frame frame frame frame v-v transmit- transmit- equal equal ted LSP ted LSP interval interval LSP LSP v-uv transmit- equal equal transmited LSP interval interval ted LSP LSP LSP uv-v equal transmit- transmit- equal interval ted LSP ted LSP interval LSP LSP uv-uv equal equal transmit- transmitinterval interval ted LSP ted LSP LSP LSP Taking an example of the 10-order LPC analysis, the equal interval LSP is such LSP corresponding to a-parameters for flat filter characteristics and the gain equal to unity, that is a 1, a, a 2 a r 0, with 0 s a Such 10-order LPC analysis, that is 10-order LSP, is the LSP corresponding to a completely flat spectrum, with LSPs being arrayed at equal intervals at 11 equally spaced apart positions between 0 and Tr. In such case, the entire band gain of the synthesis filter has minimum through-characteristics at this time.
schematically shows the manner of gain change.
Specifically, Fig.15 shows how the gain of 1/Hu,(z) and the gain of are changed during transition from the unvoiced (UV) portion to the voiced portion.
As for the unit of interpolation, it is 2.5 msec (20 samples) for the coefficient of 1/HyVz, while it is 10 msec (80 samples) for the bit rates of 2 kbps and 5 msec (40 samples) for the bit rate of 6 kbps, respectively, for the coefficient of For UV, since Sthe second encoding unit 120 performs waveform matching employing an analysis by synthesis method, interpolation with the LSPs of the neighboring V portions may be performed without performing interpolation with the equal interval LSPs. It is noted that, in the encoding of the UV portion in the second encoding portion 120, the zero-input response is set to zero by clearing the .o inner state of th'e 1/A(z) weighted synthesis filter 122 at the transient portion from V to UV.
-76- Outputs of these LPC synthesis filters 236, 237 are sent to the respective independently provided post-filters 238u, 238v. The intensity and the frequency response of the post-filters are set to values different for V and UV for setting the intensity and the frequency response of the post-filters to different values of V and UV.
The windowing of junction portions between the V and the UV portions of the LPC residual signals, that is the excitation as an LPC synthesis filter input, is now explained. This windowing is carried out by the sinusoidal synthesis circuit 215 of the voiced speech synthesis unit 211 and by the windowing circuit 223 of the unvoiced speech synthesis unit 220. The method for synthesis of the V-portion of the excitation and the method for fast synthesis of the V-portion of the excitation are explained in detail in the US patents and published EP applications listed above. In the present illustrative embodiment, this method of fast synthesis is used for generating the excitation of the V-portion using this fast synthesis method.
In the voiced portion, in which sinusoidal synthesis is performed by interpolation using the spectrum of the neighboring 0 0.
*o fR:\I .B01423.doc:iad frames, all waveforms between the n'th and (n+l)st frames can be produced. However, for the signal portion astride the V and UV portions, such as the (n+l)st frame and the (n+2)nd frame in Fig.16, or for the portion astride the UV portion and the V portion, the UV r portion encodes and decodes only data of ±80 samples (a sum total of 160 samples is equal to one frame interval). The result is that windowing is carried out beyond a center point CN between neighboring frames on the V-side, while it is carried out as far as the center point CN on the UV side, for overlapping the junction 0 portions, as shown in Fig.17. The reverse procedure is used for the UV to V transient portion. The windowing on the V-side may also be as shown by a broken line in Fig.17.
SThe noise synthesis and the noise addition at the voiced (V) portion is explained. These operations are performed by the noise synthesis circuit 216, weighted overlap-and-add circuit 217 and by the adder 218 of Fig.4 by adding to the voiced portion of the LPC residual signal the noise which takes into account the following parameters in connection with the excitation of the voiced portion as the LPC synthesis 'filter input.
o That is, the above parameters may be enumerated by the pitch lag Pch, spectral amplitude Am[i] of the voiced sound, maximum spectral amplitude in a frame Amax and the residual signal level Lev. The pitch lag Pch is the number of samples in a pitch period for a pre-set sampling frequency fs, such as fs 8 kHz, while i in the spectral amplitude Am[i] is an integer such that 0 i I for the number of harmonics in the band of fs/2 equal to I Pch/2.
The processing by this noise synthesis circuit 216 is carried out in much the same way as in synthesis of the unvoiced sound by, for example, multi-band encoding (MBE). Fig.18 illustrates a specified embodiment of the noise synthesis circuit 216.
o That is, referring to Fig.18, a white noise generator 401 .outputs the Gaussian noise which is then processed with the shortterm Fourier transform (STFT) by an STFT processor 402 to "produce a power spectrum of the noise on the frequency axis. The Gaussian noise is the time-domain white noise signal waveform windowed by an appropriate windowing function, such as Hamming window, having a pre-set length, such as 256 samples. The power spectrum from the STFT processor 402 is sent for amplitude processing to a multiplier 403 so as to be multiplied with an output of the noise amplitu'de control circuit 410. An output of the lo amplifier 403 is sent to an inverse STFT (ISTFT) processor 404 where it is ISTFTed using the phase of the original white noise as the phase for conversion into a time-domain signal. An output of the ISTFT processor 404 is sent to a weighted overlap-add circuit 217.
In the embodiment of Fig.18, the time-domain noise is generated from the white noise generator 401 and processed with orthogonal transform, such as STFT, for producing the frequencydomain noise. Alternatively, the frequency-domain noise may also be generated directly by the noise generator. By directly generating the frequency-domain noise, orthogonal transform processing operations such as for STFT or ISTFT, may be eliminated.
Specifically, a method of generating random numbers in a S. range of ±x and handling the generated random numbers as real and imaginary parts of the FFT spectrum, or a method of generating positive random numbers ranging from 0 to a maximum number IS(max) for handling them as the amplitude of the FFT spectrum and generating random numbers ranging -7t to +rt and handling these random numbers as the as the phase of the FFT spectrum, may be employed.
This renders it possible to eliminate the STFT processor 402 of Fig. 18 to simplify the structure or to reduce the processing volume.
The noise amplitude control circuit 410 has a basic structure shown for example in Fig.19 and finds the synthesized noise amplitude Am_ noise[i] by controlling the multiplication coefficient at the multiplier 403 based on the spectral amplitude Am[i] of the voiced sound supplied via a terminal 411 from the quantizer 212 of the spectral envelope of Fig.4; That is, in Fig.19, an output of an optimum noise_ mix value calculation circuit 416, to which are entered the spectral amplitude Am[i] and the pitch lag Pch, is weighted by a noise weighting circuit 417, and the resulting output is sent to a multiplier 418 so as to be multiplied with a spectral amplitude Am[i] to produce a noise amplitude Am_ noise[i]. As a first specified embodiment for noise synthesis and addition, a case in which the noise amplitude Am_ noise[i] becomes a function of two of the above four parameters, namely the pitch lag Pch and the o spectral amplitude Am[i], is now explained.
Among these functions f,(Pch, Am[i]) are: f,(Pch, Am[i]) 0 where 0 i Noise_ b x I), .fi(Pch, Am[i]) Am[i] x noise_ mix where Noise_ b x I i I, and L. noise_ mix K x Pch/ It is noted that the maximum value of noise max is noise_ mix max at which it is clipped. As an example, K 0.02, noise_ mix max 0.3 and Noise_ b 0.7, where Noise_ b is a constant which determines from which portion of the entire band this noise is to be added. In the present embodiment, the noise is added in a frequency range higher than 70%-position, that is, if fs 8 kHz, the noise is added in a range from 4000 x 0.7 2800 kHz as far as 4000 kHz.
As a second specified embodiment for noise synthesis and addition, in which the noise amplitude Am_ noise[i] is a function f 2 (Pch, Am[i], Amax) of three of the four parameters, namely the o pitch lag Pch, spectral amplitude Am[i] and the maximum spectral amplitude Amax, is explained.
****Among these functions f 2 (Pch, Am[i], Amax) are: f 2 (Pch, Am[i], Amax) 0, where 0 i Noise_ b x I), f,(Pch, Am[i], Amax) Am[i] x noise_ mix where Noise_ b x I i I, and noise_ mix K x Pch/ It is noted that the maximum value of noise_ mix is noise_ mix_ max and, as an example, K 0.02, noise_ mix_ max 0.3 and Noise_ b 0. 7.
If Am[i] x noise_ mix A max x C x noise_ mix, f 2 (Pch, Am[i], Amax) Amax x C x noise_ mix, where the constant C is set to 0.3 (C Since the level can be prohibited by this conditional equation from being excessively large, the above values of K and noise_ mix_ max can be increased further and the noise level can be increased further if the high-range level is higher.
As a third specified embodiment of the noise synthesis and addition, the above noise amplitude Am_ noise[i] may be a function of all of the above four parameters, that is f 3 (Pch, Am[i], Amax, Lev).
Specified examples of the function f 3 (Pch, Am[i], Am[max], [G Lev) are basically similar to those of the above function f 2 (Pch, Am[i], Amax). The residual signal level Lev is the root mean square o o. (RMS) of the spectral amplitudes Am[i] or the signal level as measured on the time axis. The difference from the second specified embodiment is that the values of K and noise_ mix_ max are set so i as to be functions of Lev. That is, if Lev is smaller or larger, the S. values of K, and noise_ mix_ max are set to larger and smaller values, respectively. Alternatively, the value of Lev may be set so as to be inversely proportionate to the values of K and noise_ nix max.
The post-filters 238v, 238u will now be explained.
shows a post-filter that may be used as post-filters 238u, 238v in the embodiment of Fig.4. A spectrum shaping filter 440, as an essential portion of the post-filter, is made up of a formant emphasizing filter 441 and a high-range emphasizing filter 442. An output of the spectrum shaping filter 440 is sent to a gain r adjustment circuit 443 adapted for correcting gain changes caused by spectrum shaping. The gain adjustment circuit 443 has its gain G determined by a gain control circuit 445 by comparing an input x to an output y of the spectrum shaping filter 440 for calculating gain changes for calculating correction values.
o If the coefficients of the denominators Hv(z) and Huv(z) of i. the LPC synthesis filter, that is Il-parameters, are expressed as a,, y- the characteristics PF(z) of the spectrum shaping filter 440 may be expressed by:
P
PF(z) i= o (1 kz
P
i=0 The fractional portion of this equation represents characteristics of the 'formant emphasizing filter, while the portion (1 kz 1 represents characteristics of a high-range emphasizing filter. P, y and k are constants, such that, for example, P 0.6, y 0.8 and k 0.3.
G v 159 The gain of the gain adjustment circuit 443 is given by: In the above equation, x(i) and y(i) represent an input and an f output of the spectrum shaping filter 440, respectively.
It is noted that, while the coefficient updating period of the i spectrum shaping filter 440 is 20 samples or 2.5 msec as is the updating period for the a-parameter which is the coefficient of the LPC synthesis filter, the updating period of the gain G of the gain adjustment circuit 443 is 160 samples or 20 msec.
By setting the coefficient updating period of the spectrum shaping filter 443 so as to be longer than that of the coefficient of the spectrum shaping filter 440 as the post-filter, it becomes ':possible to prevent ill effects otherwise caused by gain adjustment 13' fluctuations.
That is, in a generic post filter, the coefficient updating period of the spectrum shaping filter is set so as to be equal to the gain updating period and, if the gain updating period is selected to be 20 samples and 2.5 msec, variations in the gain values are caused even in one pitch period, thus producing the click noise. In the present embodiment, by setting the gain switching period so as to be longer, for example, equal to one frame or 160 samples or msec, abrupt gain value changes may be prohibited from occurring.
Conversely, if the updating period of the spectrum shaping filter coefficients is 160 samples or 20 msec, no smooth changes in filter characteristics can be produced, thus producing ill effects in the synthesized waveform. However, by setting the filter coefficient updating period to shorter values of 20 samples or 2.5 msec, it e becomes possible to realize more effective post-filtering.
*By way of gain junction processing between neighboring frames, the filter coefficient and the gain of the previous frame and $those of the current frame are multiplied by triangular windows of W(i) i/20 (0 i 20) and 1- W(i) where 0 i g 20 for fade-in and fade-out and the resulting products are summed together. Fig.22 shows how the gain G, of the previous frame merges to the gain G of the current 2, frame. Specifically, the proportion of using the gain and the filter coefficients of the previous frame is decreased gradually, while that of using the ga nand the filter coefficients of the current filter is increased gradually. The inner states of the filter for the current frame and that for the previous frame at a time point T of Fig.22 are started from the same states, that is from the final states of the previous frame.
The above-described signal encoding and signal decoding apparatus may be used as a speech codebook employed in, for example, a portable communication terminal or a portable telephone set shown in Figs.23 and 24.
Fig.23 shows a transmitting side of a portable terminal employing a speech encoding unit 160 configured as shown in Figs. 1 .and 3. The speech signals collected by a microphone 161 are amplified by an amplifier 162 and converted by an analog/digital converter 163 into digital signals which are sent to the S speech encoding unit 160 configured as shown in Figs.1 and 3. Tr he digital signals from the A/D converter 163 are supplied to the input terminal 101. The speech encoding unit 160 performs encoding as explained in connection with Figs.1 and 3. Output signals of output terminals of Figs.1 ahd 2 are sent as output signals of the speech ,encoding unit 160 to a transmission channel encoding unit 164 which then performs channel coding on the supplied signals. Output signals of the transmission channel encoding unit 164 are sent to a modulation circuit 165 for modulation and thence supplied to an antenna 168 via a digital/analog converter 166 and an RF amplifier 167.
S- Fig.24 show.s a reception side of the portable terminal employing a speech decoding unit 260 configured as shown in Fig.4.
The speech signals received by the antenna 261 of Fig.14 are amplified an RF amplifier 262 and sent via an analog/digital (A/D) converter 263 to a demodulation circuit 264, from which lo demodulated signal are sent to a transmission channel decoding unit 265. An output signal of the decoding unit 265 is supplied to a speech decoding unit 260 configured as shown in Figs.2 and 4. The speech decoding unit 260 decodes the signals in a manner as explained in connection with Figs.2 and 4. An output signal at an S" output terminal 201 of Figs.2 and 4 is sent as a signal of the speech decoding unit 260 to a digital/analog converter 266. An analog speech signal from the D/A converter 266 is sent to a speaker 268.
The present invention is not limited to the above-described embodiments. For 'example, the construction of the speech analysis side (encoder) of Figs. and 3 or the speech synthesis side (decoder) of Figs.2 and 4, described above as hardware, may be realized by a software program using, for example, a digital signal processor (DSP). The synthesis filters 236, 237 or the post-filters 238v, 238u on the decoding side may be designed as a sole LPC synthesis filter or a sole post-filter without separation into those for the voiced speech or the unvoiced speech. The present invention is also not limited to transmission or recording/reproduction and may be applied to a variety of usages such as pitch conversion, speed conversion, synthesis of the computerized speech or noise 1o suppression.
9 0* 0 0 ooeo o «ooo
Claims (2)
1. A method for encoding an audible signal, comprising the steps of: converting parameters derived from the input audible signal into a frequency- domain signal; and performing weighted vector quantization of said parameters, the weight of said weighted vector quantization being calculated based on results of an orthogonal transform of parameters derived from an impulse response of a weight transfer function.
2. The method for encoding the audible signal as claimed in claim 1, wherein said orthogonal transform is fast Fourier transform and wherein, if a real part and an imaginary part of a coefficient resulting from the fast Fourier transform are expressed as re and im, respectively, one of (re, im) itself, *°o 0 oo. re^2+im^2 or as interpolated, is used as said weight. DATED this Twenty-ninth Day of November, 2000 Sony Corporation Patent Attorneys for the Applicant SPRUSON FERGUSON [R:\LIBQ]583.doc:mxl
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
AU72013/00A AU7201300A (en) | 1995-10-26 | 2000-12-04 | Speech encoding method |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7-302129 | 1995-10-26 | ||
AU72013/00A AU7201300A (en) | 1995-10-26 | 2000-12-04 | Speech encoding method |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
AU70372/96A Division AU725140B2 (en) | 1995-10-26 | 1996-10-23 | Speech encoding method and apparatus and speech decoding method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
AU7201300A true AU7201300A (en) | 2001-02-22 |
Family
ID=3754807
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
AU72013/00A Abandoned AU7201300A (en) | 1995-10-26 | 2000-12-04 | Speech encoding method |
Country Status (1)
Country | Link |
---|---|
AU (1) | AU7201300A (en) |
-
2000
- 2000-12-04 AU AU72013/00A patent/AU7201300A/en not_active Abandoned
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0770990B1 (en) | Speech encoding method and apparatus and speech decoding method and apparatus | |
EP0772186B1 (en) | Speech encoding method and apparatus | |
EP0770989B1 (en) | Speech encoding method and apparatus | |
KR100487136B1 (en) | Voice decoding method and apparatus | |
US6611800B1 (en) | Vector quantization method and speech encoding method and apparatus | |
EP0841656B1 (en) | Method and apparatus for speech signal encoding | |
US6018707A (en) | Vector quantization method, speech encoding method and apparatus | |
JPH10214100A (en) | Voice synthesizing method | |
AU7201300A (en) | Speech encoding method | |
JP3675054B2 (en) | Vector quantization method, speech encoding method and apparatus, and speech decoding method | |
JPH09127997A (en) | Voice coding method and device | |
JPH09127993A (en) | Voice coding method and voice encoder |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MK4 | Application lapsed section 142(2)(d) - no continuation fee paid for the application |