Encoding and decoding apparatus of LSP (line spectrum pair) parameters

An encoding and decoding apparatus quantizes LSP (Line Spectrum Pair) parameters, which are characteristics parameters of spectrum information included in a voice signal, with high accuracy and stability. This encoding and decoding apparatus comprises a first quantizer in which quantization is performed independently in the unit of one frame, and a second quantizer which uses a correlation between adjacent frames. An error comparator compares quantization errors produced by the first quantizer and quantization errors produced by the second quantizer to select the one quantizer whose quantization errors are less than that of the other quantizer. The first quantizer produces a highly accurate quantization with stability regardless a condition of an input voice signal, while the second quantizer produces a highly accurate quantization when input voice signal stays quasi-stationary. By switching these two quantizers, this apparatus can offer stable and highly accurate quantization regardless of the condition of the input voice signal.

FIELD OF THE INVENTION

This invention relates to an encoding and decoding apparatus of LSP parameters which are characteristic parameters of spectrum information included in voice signals.

DESCRIPTION OF THE PRIOR ART

A main stream of the voice encoding apparatus which handles a signal of which bit rate ranging from 4 to 8 kbps is to separate spectrum information from voice source information through analyzing a voice signal before encoding them. The LSP parameter is a characteristic parameter indicating spectrum information. The LSP parameter, in general, uses 10 dimensions/frame, and one of the most fundamental method for encoding the LSP parameter is to handle each individual value as a scalar for quantization. However, since this method produces rather low quantization effect, a vector quantization which quantizes a plurality of LSP parameters in a mass is more frequently used. When utilizing a correlation between adjacent frames, the higher quantization effect can be gained because the LSP parameter has influential correlation with adjacent frames.

When using a conventional quantization apparatus which adopts the correlation between adjacent frames, an encoding and decoding can be achieved through the following steps:

1. Calculate the LSP parameter of a present frame from an input voice signal.

2. Calculate an error between the above calculated LSP parameter and a linear-predictive LSP parameter value which is predicted from the past quantized value stored in a buffer.

3. Select a code from a code book to minimize the error, and output the selected code.

4. A decoding means decodes the quantized value from the outputted code to store the quantized value into the buffer.

When an input voice signal stays quasi-stationary, the above conventional apparatus obtains high predictive gain to perform a highly accurate quantization. However, when an input voice signal is in transient state, predictive gain lowers and the accuracy of quantization also lowers. When a frame length is long, the transient factor between adjacent frames becomes large, which reduces the correlation between the frames. The predictive gain thus lowers. When the quantization method which adopts the correlation between frames for prediction is used, an input voice signal is hence supposed to stay quasi-stationary. This method is good at voice encoding when a frame length is short, but it does not produce a good result when a frame length is long.

Since the above conventional apparatus requires predicting a present value based on past quantized values, a code error produced in a transmission line influences not only the error frame but also the frames following. The conventional apparatus is thus vulnerable to errors.

SUMMARY OF THE INVENTION

The purpose of this invention is to overcome the problems entailed to the conventional apparatus: This invention offers an encoding and decoding apparatus of LSP parameters which can maintain a high accuracy of quantization even if an input voice signal is in transient state, and which also has higher resistance to errors.

In order to achieve the above purpose, this invention comprises:a) a first quantizing means for independent vector quantization of LSP parameters of an input voice signal in each frame,b) a second quantizing means for vector quantization of LSP parameters of an input signal by using correlation between adjacent frames,c) an error comparison means for comparing quantization errors produced by the first quantizing means and the second quantizing means, andd) a switch for selecting one quantizing means which produces smaller error than the other quantizing means.

In other exemplary embodiment, first, the LSP parameters of the present frame are quantized by the second quantizing means into vector independently in the unit of one frame, second, a quantized value of the present frame is predicted based on the quantized value in the first step and the quantized value of the previous frame before quantizing a difference into vector between LSP parameters of the present frame and the predicted value.

Further in other exemplary embodiment, this invention has a detecting means for detecting errors produced on a quantization code in a transmission line. When a code of the next frame, an error was detected in the present frame, is produced by the first quantizing means (using a linear prediction analysis), a decoded quantized value is outputted. When a code is produced by the second quantizing means (using a correlation between adjacent frames), a quantized value from LSP parameters of each frame independently into vector is decoded and then outputted.

Further in other exemplary embodiment, this invention has, on the decoding side, error detecting means for detecting errors produced on a quantization code in a transmission line, and also has a judging means for judging whether a frequency of detecting errors is less than a threshold or not. When a error-detecting frequency on the decoding side is less than a threshold, the switch selects either one quantizing means which produces less errors of quantization. When the error-detecting frequency is not less than a threshold, the switch stays at the first quantizing means.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1is a block diagram illustrating a structure of a first exemplary embodiment of an encoding apparatus of LSP parameters according to this invention. InFIG. 1, a numeral100represents an LSP parameter calculating means,101: a first quantizing means for quantizing independently in the unit of one frame,102: a second quantizing means for quantizing by using an correlation between adjacent frames,103and104: decoding means,105: an error comparing means,106: a switch for switching the quantizing means,107: an input voice signal,108: calculated LSP parameters,109: an output code of the first quantizing means101,110: an output code of the second quantizing means102,111: a quantized value produced by the first quantizing means101,112: a quantized value produced by the second quantizing means102,113: a signal for controlling switch106, and114represents an output code.

An operation of this embodiment is explained here: The LSP parameters108calculated by the LSP calculating means100are fed into the first and second quantizing means. The first quantizing means101performs quantization independently in the unit of one frame and outputs the code109The second quantizing means102performs quantization by using a correlation between adjacent frames and outputs the code110. The decoding means103decodes the quantized value111from the code109, and the decoding means104decodes the quantized value112from the code110. The error comparing means105calculates errors of the quantized values111,112and LSP parameters108, then compares these errors, and selects either one quantizing means which produces less errors by switching the switch106, finally, outputs an output code of the selected quantizing means as the output code114of this encoding apparatus.

Since the second quantizing means102performs quantization by using a correlation between adjacent frames, a transmission error influences the next frame and onward. On the other hand, the first quantizing means101performs quantization in the unit of frame independently, the errors do not affect the next frame and onward. The influence of errors, therefore, is transmitted only when the second quantizing means is selected in series, and the influence of errors is not transmitted to the frame where the first quantizing means is selected and frames onward. The selecting probability of the first or second quantizing means largely depends on the characteristics of an input voice signal. In normal conversation, the ratio of selecting the first and second quantizing means ranges from 1:1 to 1:2. Either one of two means is hardly selected in series during a long period. The transmission of error-influence is hence limited to a short period, which proves that this invention has a higher resistance to errors than a conventional embodiment where an error influence kept transmitting.

According to this embodiment, a high accurate quantization is achieved regardless the condition of an input voice signal by this way:

1. When a correlation between adjacent frames is small, the first quantizing means is used, wherein quantization is performed in the unit of one frame independently.

2. When a correlation between adjacent frames is large, the second quantizing means is used, wherein quantization is performed by using the correlation between adjacent frames.

FIG. 2details the second quantizing means102illustrated in FIG.1. The numeral100represents the LSP parameter calculating means which is shown in FIG.1. The numeral201represents an error minimizing means in the first step,202: a first code book,203and207: decoding means,204: a predicting means for linearly predicting a value of the present frame based on the past quantized values,206: a second code book,208: a buffer for storing the past quantized values,107: an input voice signal,211: a calculated LSP parameter of the present frame,212: an output code of the first step,213: a quantized value in the first step,214: an output code of the second step,215: a quantized value of the present frame,216: past quantized values,217: a predicted LSP parameter of the present frame.

An operation of this embodiment is explained here: Based on the input voice signal107, the LSP parameter calculating means100calculates the LSP parameter211of the present frame. First, the error minimizing means of the first step201selects a code from the first code book202so that an error between the LSP parameter211and the selected code can be minimized, and outputs the code as the output signal212. Second, the predicting means204linearly predicts an LSP parameter of the present frame217based on quantized value in the first step213which is decoded by the decoding means203and the past quantized values216which is stored in the buffer208. The error minimizing means in the second step205selects a code from the second code book206so that an error between the predicted parameter217and LSP parameter of the present frame108which is calculated based on the input voice signal107can be minimized, and outputs the code as the output signal214. The decoding means207decodes quantized value of the present frame215from the output code214, and stores the decoded value into the buffer208. The selecting operations in the first and second steps will be explained later.

FIG. 3details the process of the second step. InFIG. 3, the numeral300represents a pre-quantized value of an LSP parameter in the previous frame (cn-l),301: a pre-quantized value of an LSP parameter in the present frame (an),302: a quantized value of the previous frame (qn-l),303: a quantized value of the present frame in the first step (vn),304: a predicted value of the present frame (pn),305: an error (dn) between predicted value (pn) and pre-quantized value (an),306: a quantized value of the present frame.

A predicted value of the present frame304can be described as follows: pn=α(qn−1+(1−α)vn

Accordingly, error305is found as: dn=cn−pn=cn−{αqn−1+(1−α)vn}, and quantized value of the present frame306is found as: qn=pn+d′n={αqn−1+(1−α)vn}+d′n

where α is a predicting coefficient, d′n is an approximation of the code vector305. The error minimizing means205in the second step selects a combination of a predicting coefficient α and a code vector d′n from the second code book206so that the combination can minimize the error between the LSP parameter301of the present frame and the quantized value306of the present frame, and then outputs the code.

By fixing predicting coefficient α, the error minimizing in the second step can be processed by only selecting a code vector which minimizes an error against the error305. A number of calculating operation thus can be reduced.

According to this exemplary embodiment, a two-step-structure of the second quantizing means which uses a correlation between adjacent frames can enhance the resistance to transmission errors, namely, in the first step a quantization is performed in the unit of one frame independently and in the second step a quantization is performed by using the correlation between adjacent frames.

FIG. 4is a block diagram illustrating a structure of the decoding apparatus corresponding to the above encoding apparatus. InFIG. 4, the numeral400represents a transmission error detecting means,401: a switch controlling means,402: a code book for storing code vectors produced by the first quantizing means,403: a code book for storing code vectors produced in the first step of the second quantizing means,404: a code book for storing code vectors produced in the second step of the second quantizing means,405: a predicting means,406: a decoding means,407and408: switches for switching decoding means,409: a switch for switching decoded values being outputted,410: a buffer for storing a quantized value of a previous frame,411: a transmission code,412: a quantized value by the first quantizing means,413: a quantized value in the first step of the second quantizing means,414: a predicted value of the present frame,415: a quantized value in the second step of the second quantizing means,416: a quantized value being outputted from the decoding apparatus.

The operation of the above decoding apparatus is described here:

A quantized value can be decoded by a decoding means corresponding to the first or second quantizing means: When the transmission code411is produced by the first quantizing means of the encoding apparatus, the switches407and408are switched to side “a”. When the transmission code411is produced by the second quantizing means of the encoding apparatus, the switches407and408are switched to side “b”. When a frame has no transmission error, the switch controlling means401closes two switches of the switch409, namely A-B and C-D, among 6 terminals (A, B, C, D, E, F). In this condition, decoded values from each decoding means are rightly decoded and outputted. When the transmission error detecting means400detects transmission errors, the switch controlling means401closes D-E of the switch409. In this condition, the transmission code411is neglected, and the quantized value stored in the buffer410is outputted. For the next frame to the error-foundframe and following frames, as far as a code produced by the second quantizing means being kept producing, the switch controlling means401closes A-F among the terminals thereof. In this condition, only the quantized value413which is decoded by the codes in the first step is outputted, and the quantized value decoded by the second step is neglected. After the next frame to the error-found-frame, for the first frame where a code produced by the first quantizing means, the switch controlling means401closes A-B and C-D among the terminals thereof, and restores the switch to a position prior to error-detecting.

According to this exemplary embodiment, the second step of the second quantizing means which carries pasterror-influence is bypassed in the next frame to the error-found-frame and the following frames. The error influence is thus prevented from transmitting to the next frame and onward, and is minimized.

FIG. 5is a block diagram illustrating a structure of combining the coding and decoding apparatuses. InFIG. 5, the numeral500represents the first quantizing means,501: the second quantizing means,502: a switch for switching the quantizing means500to and from501. These are mounted to the encoding apparatus511,508: an output code. Structures of other devices of the encoding apparatus511are detailed in FIG.1and FIG.2.

The numeral503represents the transmission error detecting means,504: an error-frequency judging means,505: a first decoding means,506: a second decoding means,507: a switch for switching the decoding means507to/from506, which corresponds to the switch407in FIG.4. These devices are mounted in the decoding apparatus512. The numeral509represents an input code of the decoding side. The first decoding means505uses the code book402shown in FIG.4. The second decoding means506comprises the code books403,404shown inFIG. 4, predicting means405, decoding means406, switch409and buffer410. Other structure of the decoding means512are detailed in FIG.4.

The operation is explained here: The error detecting means503of the decoding side detects transmission errors of the input code509transmitted. The errorfrequency detecting means504compares a frequency of detected error with a predetermined threshold. When the error-frequency is less than the threshold, the switch502selects the first or second quantizing means (500or502) whichever has a smaller quantization error. When the error-frequency is not less than the threshold, the switch502is fixed at the first quantization means500. The decoding side operates same as explained in FIG.4.

When the error-frequency increases, a frequency of bypassing the second quantizing means501increases, and an accuracy of decoded quantized-value-lowers. As this exemplary embodiment shows, through monitoring the error-frequency, a switch of the coding side (opponent) is fixed at the first quantization means500when the frequency is high, then the accuracy of the decoded quantized-value cannot much lower. On a bidirectional transmission line, the error-frequency of the output code508transmitted from the coding side, can be predicted before being received by the opponent based on the error-frequency of the -input code509received at the decoding side. As this embodiment shows, when the switch502switching the quantizing means at the encoding side based on the error-frequency of the decoding side, is controlled by both this and that sides, the resistance to the transmission errors can be enhanced without any additional information.

This exemplary embodiment thus concludes as follows: When the error-frequency detected by the error detecting means is judged not less than the predetermined threshold, the switch for switching the quantizing means is fixed to the first quantizing means which performs the quantization in the unit of one frame independently. Through this method, influence by the errors is prevented from transmitting, and the resistance to errors is enhanced.

As described above, this invention makes it possible to obtain a high accurate and stable quantization regardless a condition of the input voice signal. The way is to use the switching of two different quantizing means, namely, the first quantizing means which performs quantization independently in the unit of one frame and the second quantizing means which performs quantization by using the correlation between adjacent frames.

When the second quantizing means of this invention is divided into two steps, namely, the first step which performs quantization independently in the unit of one free, and the second step which performs quantization by using the correlation between adjacent frames, the resistance to the transmission errors can be enhanced.