|
Description  |
|
|
TECHNICAL FIELD OF THE INVENTION
This invention deals with voice coding techniques and more particularly
with a method and means for multi-rate voice coding.
BACKGROUND OF THE INVENTION
Digital networks are currently used to transmit, and/or store where
convenient, digitally encoded voice signals. For that purpose, each voice
signal to be considered is, originally, sampled and each sample digitally
encoded into binary bits. In theory, at least, the higher the number of
bits used to code each sample the better the coding, that is the closest
the voice signal would be when decoded before being provided to the end
user. Unfortunately, for the network to be efficient from an economical
stand point, the traffic or in other words the number of connected users
acceptable without network congestion needs be maximized. This is one of
the reasons why methods have been provided for lowering the voice coding
bit rates while keeping the coding distortion (noise) at acceptable
levels, rather than dropping users when traffic increases over a network.
It looks reasonable to improve the voice coding quality when the traffic
permits it and if needed lower said quality to a predetermined acceptable
level under high traffic conditions. This switching from one quality (one
bit rate) to another, should be made as simple and quick as possible at
any node within the network. For that purpose, multirate coders should
provide frames with embedded bit streams whereby switching from one
predetermined bit rate to a lower predetermined rate would simply require
dropping a predetermined portion of the frame.
SUMMARY OF THE INVENTION
One object of this invention is to provide means for multi-rate coding a
voice signal using Code-Excited encoding techniques.
The voice signal is short-term filtered to derive a short-term residual
therefrom, said short-term residual is submitted to a first Long-Term
Predictive Code-Excited coding operation, then decoded and subtracted from
the Code-Excited coding input to derive an Error signal, which Error
signal is in turn Long-Term Predictive Code-Excited coded. Multi-rate
frame involves both Long-Term Predictive Code-Excited coding.
More particularly, the present invention processes by short-term filtering
the original voice signal to derive a voice originating short-term
residual signal; submitting said short-term residual to a first
Code-Excited (CE) coding operation including subtracting from said
short-term residual a first predicted residual signal to derive a first
long-term residual signal, coding said long term residual into a gain g1
and an address k1; subtracting said first reconstructed residual (after
decoding) from the first long-term residual to derive a first Error signal
therefrom; submitting said first Error signal to subsequent Code-Excited
long-term prediction coding into g2 and k2; and aggregating (g1, k1) and
(g2, k2) into a same multi-rate coded frame, whereby switching to a lower
rate coded frame would be achieved through dropping (g2, k2).
Obviously, the above principles may be extended to a higher number of rates
by extending it to third, fourth, etc, . . . Code-Excited coding.
Further objects, characteristics and advantages of the present invention
will be explained in more details in the following, with reference to the
enclosed drawings, which represent a preferred embodiment.
The foregoing and other objects, features and advantages of the invention
will thereof be made apparent from the following more particular
description of a preferred embodiment of the invention as illustrated in
the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram of a coder according to the invention.
FIG. 2 is a flow chart for the operations involved in devices 10, 12 and 13
of FIG. 1.
FIG. 3 is a flow chart for Code-Excited coding operations.
FIG. 4 is a block diagram for implementing the device 14 of FIG. 1.
FIG. 5 is a flow chart of the process of the invention as applied to device
of FIG. 1.
FIG. 6 is a flow chart for the decoder to be used with the invention.
FIG. 7 is a block diagram of said decoder.
FIG. 8 is a block diagram for the coder according to the invention, applied
to base-band coding.
DESCRIPTION OF PREFERRED EMBODIMENTS
Represented in FIG. 1 is a simplified block diagram of a bi-rate coder,
which, as already mentioned, might be extended to a higher number of
rates.
The voice signal limited to the telephone bandwidth (300 Hz-3300 Hz),
sampled at 8 KHz and digitally PCM encoded with 12 bits per sample in a
conventional Analog to Digital Converter (not shown) provides samples
s(n). These samples are first pre-emphasized in a device (10) and then
processed in a device (12) to generate sets of partial autocorrelation
derived coefficients (PARCOR derived) a.sub.i 's. Said a.sub.i
coefficients are used to tune a short term predictive filter (STP) (13)
filtering s(n) and providing a short-term residual signal r(n). Said
short-term residual is coded into a first Code-Excited long-term
prediction coder (A). To that end, it is processed to derive therefrom a
first long-term residual e(n) by subtracting from r(n), a predicted first
residual signal corresponding to the synthesized (reconstructed) first
residual delayed by a predetermined delay M (equal to a multiple of the
voice pitch period) and multiplied by a gain factor b.rl(n-M) using as
first long-term predictor.
It should be noted that for the purpose of this invention block coding
techniques are used over r(n) blocks of samples, 160 samples long.
Parameters b and M are evaluated every 80 samples. The flow of residual
signal samples e(n) is subdivided into blocks of L consecutive samples and
each of said blocks is then processed into a first Code-Excited coder
(CELP1) (15) where K sequences of L samples are made available as
normalized codewords. Coding e(n) involves then selecting the codeword
best matching the considered e(n) sequence in mean squared error criteria
consideration and replacing e(n) by a codeword reference number k1.
Assuming the pre-stored codewords be normalized, then a first gain
coefficient g1 should also be determined and tested.
Once k1 is determined, a first reconstructed residual signal e1(n)=g1.
CB(k1) generated in a first decoder (DECODE1) (16) is fed into said
long-term predictor (14).
Said reconstructed residual is also subtracted from e(n) in a device (17)
providing an error signal r'(n).
The error signal r'(n) is then fed into a second Code-Excited/Long-Term
Prediction coder similar to the one described above. Said second coder
includes a subtractor (18) fed with the error signal r'(n) and providing
an error residual signal e'(n) addressing a second Code-Excited coder
CELP2 (19). Said device (19) codes e'(n) into a gain factor g2 and a
codeword address k2. Said coder is also made to feed the codeword CB(k2)
and gain g2 into a decoder (20) providing a decoded error signal
e2(n)=g2.multidot.CB(k2)
Said signal e2(n) is also fed into a second Long-Term Predictor (LTP2)
similar to LTP1 and the output of which is subtracted from r'(n) in device
(18).
Finally a full rate frame is generated by multiplexing the a.sub.i 's b's,
M's, (g1, k1)'s and (g2, k2)'s data into a multirate (bi-rate) frame.
As already mentioned, the process may easily be further extended to higher
rates by serially inserting additional Code-Excited/Long-Term Predictive
coders such as A or B.
Represented in FIG. 2 is a flow chart showing the detailed operations
involved in both pre-emphasis and PARCOR related computations. Each block
of 160 signal samples s(n) is first processed to derive two first values
of the signal auto-correlation function :
##EQU1##
The pre-emphasis coefficient R is then computed
R=R1/R2
and the original set of 160 samples s(n) are converted into a
pre-emphasized set sp(n)
sp(n)=s(n)-R.multidot.s(n-1)
The pre-emphasized a.sub.i parameters are derived by a step-up procedure
from so-called PARCOR coefficients K.sub.i in turn derived from the
pre-emphasized signal sp(n) using a conventional Leroux-Guegen method. The
eight a.sub.i or PARCOR K.sub.i coefficients may be coded with 28 bits
using the Un/Yang algorithm. For reference to these methods and algorithm,
one may refer to:
J. Leroux and C. Guegen: "A fixed point computation of partial correlation
coefficients" IEEE Transactions on ASSP pp 257-259, June 1977;
C.K. Un and S.C. Yang "Piecewise linear quantization of LPC reflexion
coefficients" Proc. Int. Conf. on QSSP Hartford, May 1977.
L.D. Markel and A.H. Gray: "Linear prediction of speech" Springer Verlag
1976, Step-up procedure pp 94-95.
European Patent 2998 (U.S. Pat. No. 4,216,354) assigned to this assignee.
The short term filter (13) derives the short-term residual signal samples :
##EQU2##
Several methods are available for computing the long-term factors b and M
values. One may for instance refer to B.S. Atal "Predictive Coding of
Speech at low Bit Rate" published in IEEE Trans on Communication, Vol.
COM-30, April 1982, or to B.S. Atal and M.R. Schroeder, "Adaptive
prediction coding of speech signals", Bell System Technical Journal; Vol
49, 1970.
Generally speaking, M is a pitch value or an harmonic of it and methods for
computing it are known to a man skilled in the art.
A very efficient method was also described in a copending European
application (cf FR987004) to the same assignee.
According to said application:
##EQU3##
with b and M being determined twice over each block of 160 samples, using
80 samples and their 80 predecessors.
The M value, i.e. a pitch related value, is therein computed based on a
two-step process. A first step enabling a rough determination of a coarse
pitch related M value, followed by a second (fine) M adjustment using
auto-correlation methods over a limited number of values.
1. First step:
Rough determination is based on use of non-linear techniques involving
variable threshold and zero crossing detections more particularly this
first step includes:
initializing the variable M by forcing it to zero or a predefined value L
or to previous fine M;
loading a block vector of 160 samples including 80 samples of current
sub-block, and the 80 previous samples;
detecting the positive (Vmax) and negative (Vmin) peaks within said 160
samples;
computing thresholds positive threshold Th.sup.+ =alpha.multidot.Vmax
negative threshold Th.sup.-= alpha.multidot.Vmin alpha being an
empirically selected value (e.g. alpha =0.5)
setting a new vector X(n) representing the current sub-block according to:
##EQU4##
This new vector containing only -1, 0 or 1 values will be designated as
"cleaned vector";
detecting significant zero crossings (i.e. sign transitions) between two
values of the cleaned vector i.e. zero crossing close to each other;
computing M' values representing the number of r(n) sample intervals
between consecutive detected zero crossings;
comparing M' to the previous rough M by computing
.DELTA.M=.vertline.M'-M.vertline. and dropping any M' value whose .DELTA.M
is larger than a predetermined value D (e.g. D=5);
computing the coarse M value as the mean value of M' values not dropped.
2. Second step:
Fine M determination is based on the use of autocorrelation methods
operated only over samples taken around the samples located in the
neighborhood of the pitched pulses.
Second step includes:
Initializing the M value either as being equal to the rough (coarse) M
value just computed assuming it is different from zero, otherwise taking M
equal to the previous measured fine M;
locating the autocorrelation zone of the cleaned vector, i.e. a
predetermined number of samples about the rough pitch;
computing a set of R(k') values derived from:
##EQU5##
with k' being the cleaned vector sample index varying from a lower limit
Mmin to the upper limit Mmax of the selected autocorrelation zone, with
limits of the autocorrelation zone Mmin=L, Mmax=120 for example.
Once b and M are computed, they are used to tune the inverse Long-Term
Predictor (14) as will be described further. The output of the device (14)
i.e. a predicted first long-term residual subtracted to r(n) provides
first long-term residual signal e(n). Said e(n) is in turn, coded into a
coefficient k1 and a gain factor g1. The coefficient k1 represents the
address of a codeword CB(k1) pre-stored into a table located in the device
(CELP1) (15). The codeword and gain factor selection is based on a mean
squared error criteria consideration; i.e. by looking for the k table
address providing a minimal E, with:
E=[e(n)-g1.multidot.CB(k,n)].sup.T .multidot.[e(n)-g1.multidot.CB(k,n)](1)
wherein:
T: means mathematical transposition operation. CB(k,n)=represents the
codeword located at the address k within the coder 15 of FIG. 1.
In other words, E is a scalar product of two L components vectors, wherein
L is the number of samples of each codeword CB.
The optimal scale factor G(k) [g1 in (1)] that minimizes E is determinated
by setting:
##EQU6##
The denominator of equation G(k) is a normalizing factor which could be
avoided by pre-normalizing the codewords within the pre-stored table.
The expression (1) can be reduced to:
##EQU7##
and the optimum codeword is obtained by finding k maximizing the last term
of equation (2).
Let CB2(k) represent CB(k,n).sup.2 and, SP(k) be the scalar product e.sup.T
(n).multidot.CB(k,n),
Then one has first to find k providing a term
##EQU8##
maximum, and then determine the G(k) value from
##EQU9##
The above statements could be differently expressed as follows:
Let {en} with n=1, 2, . . . , L represent the sequence of e(n) samples to
be encoded. And let {Y.sub.n.sup.k) with n=1, 2, . . . , L and k=1, 2, . .
. , K, where K=2.sup.cbit, represent a table containing K codewords of L
samples each.
The CELP encoding would lead to:
computing correlation terms:
##EQU10##
for k=1, . . . , K
selecting the optimum value of k leading to
Ekopt=Max (Ek)
k=1, . . . , K
converting the e(n) sequence into a block of cbit =log.sub.2 K bits, plus
the G(k) encoding bits.
The algorithm for performing the above operations is represented in FIG. 3.
First two index counters i and j are set to i=1 and j=1. The table is
sequentially scanned. A codeword CB(l,n) is read out of the table.
A first scalar product is computed
##EQU11##
This value is squared into SP2(1) and divided by a squared value of the
corresponding codeword [i.e. CB2(1)]. i is then incremented by one and the
above operations are repeated until i=K, with K being the number of
codewords in the code-book. The optimal codeword CB(k), which provides the
maximum
##EQU12##
within the sequence
##EQU13##
for i=1, . . . , K is then selected. This operation enables detecting the
table reference number k.
Once k is selected, then the gain factor computed using:
##EQU14##
Assuming the number of samples within the sequence e(n) is selected to be
a multiple of L, then said sequence e(n) is subdivided into JL windows
each L samples long, then j is incremented by 1 and the above process is
repeated until j =JL.
Computations may be simplified and the coder complexity reduced by
normalizing the codebook in order to set each codeword energy to the unit
value. In other words, the L component vector amplitude is normalized to
one
CB2(i)=1 for i=1, . . . , K
In that case, the expression determining the best codeword k is simplified
(all the denominators involved in the algorithm are equal to the unit
value). The scale factor G(k) is changed whereas the reference number k
for the optimal sequence is not modified.
This method would require a memory fairly large to store the table. For
instance said size K.times.L may be of the order of 40 kilobits for K=256
and L=20.
A different approach is recommended here. Upon initialization of the
system, a first block of L+K samples of residual signal, e.g. e(n) would
be stored into a table. Then each subsequent L-word long sequence e(n) is
correlated with the (L+K) samples long table sequence by shifting the (en)
sequence from one sample position of the next, over the table.
##EQU15##
for k=1, . . . , K.
This method enables reducing the memory size required for the table, down
to 2 kilobits for K=256, L=20 or even lower.
Represented in FIG. 4 is a block diagram for the inverse Long-Term
Predictor (14). Once selected in the coder (15), the first reconstructed
residual signal
e1(n)=g1.multidot.CB(k1)
provided by device (16), is fed into an adder (30), the output of which is
fed into a variable delay line the length of which is adjusted to M. The M
delayed output of variable delay line (32) is multiplied by the gain
factor b into multiplier (34). The multiplied output is fed into adder
(30).
As represented in FIG. 1, the b and M values computed may also be used for
the subsequent Code-Excited coding of the error signal derived from
subtracting a reconstructed residual from a long term residual.
Represented in FIG. 5 is an algorithm showing the operations involved in
the multi-rate coding according to the invention assuming multi-rate be
limited to two rates for sake of simplification of this description.
The process may be considered as including the following steps:
(1) Short-Term:
The s(n) signal is converted into a short-term residual r(n) through a
short-term filtering operation using a digital filter with a(i)
coefficients; Said coefficients are signal dependent coefficients derived
from a pre-emphasized signal sp(n) through short-term analysis operations.
(2) First Long-Term Prediction
The short-term residual signal r(n) is converted into a first long-term
residual e(n), with:
e(n)=r(n)-b.multidot.r1(n-M),
wherein: b is a gain factor derived from the short-term residual analysis,
M is a pitch multiple; and rl(n-M) is derived from a reconstructed
previous long-term residual, delayed by M.
(3) First Code-Excited Coding
The first long-term residual signal is coded into a first codeword table
address (k1) and a first gain factor (g1). This is achieved by correlating
a predetermined length block of e(n) samples with pre-stored codewords to
determine the address k1 of the codeword best matching said block
(4) First Code-Excited coding error
A coding error signal r'(n) is derived by subtracting a decoded e1(n) from
the uncoded e(n).
(5) Second Long-Term Prediction:
The error signal is in turn converted into an error residual e'(n) through
a second long-term residual operation similar to the previous one, i.e.
using the already computed M and b coefficients to derive:
e'(n)=r'(n)-b.multidot.r2(n-M).
(needless to mention that keeping for this second step the previously
computed b and M coefficients helps saving in computing workload.
Recomputing these might also be considered).
(6) Second Code-Excited Coding:
The error residual signal is in turn submitted to Code-Excited coding
providing a best matching second codeword address (k2) and a second gain
factor (g2).
The above process provides the data a.sub.i, b's, M's, (g1, k1)'s and (g2,
k2)'s to be inserted into a bi-rate frame using conventional multiplexing
approaches. Obviously, the process may be extended further to a higher
number of rates by repeating the three last steps to generate (g3, k3)'s,
(g4, k4)'s, etc, . . .
Synthesizing back the original voice signal from the multi-rate (bi-rate)
frame may be achieved as shown in the algorithm of FIG. 6, assuming the
various data had previously been separated from each other through a
conventional demultiplexing operation. The k1 and k2 values are used to
address a table, set as mentioned above in connection with the coder's
description, to fetch the codewords CB(k1) and CB(k2) therefrom. These
operations enable reconstructing:
el(n)=g1.multidot.CB(k1, n)
e2(n)=g2.multidot.CB(k2, n)
Then
e"(n)=e1(n)+e2(n)
Said e"(n) is then fed into a long-term synthesis filter 1/B(z) tuned with
b and M and providing r"(n).
r"(n) is then filtered by a short-term synthesis digital filter 1/A(z)
tuned with the set of a.sub.i coefficients, and providing the synthesized
voice signal s"(n).
A block diagram arrangement of the above synthesizer (receiver) is
represented in FIG. 7. A demultiplexor (60), separates the data from each
other. k1 and k2 are used to address the tables (61) and (62), the output
of which are fed into multipliers (63) and (64) providing el(n) and e2(n).
An adder (65) adds el(n) to e2(n) and feeds the result into the filter
1/B(z) made of adder (67), a variable delay line (68) adjusted to length
M, and a multiplier (69). The output of adder (67) is then filtered
through a digital filter (70) with coefficients set to a.sub.i and
providing the synthesized back voice signal s"(n).
The multi-rate approach of this invention may be implemented with more
sophisticated coding schemes. For instance, it applies to conventional
Base-band coders as represented in FIG. 8. Once the original voice signal
s(n) has been processed to derive the short-term residual r(n), it is
split into a low frequency bandwidth (LF) signal rl(n) and a high
bandwidth (HF) signal rh(n) using a low-pass filter LPF (70) and adder
(71). The high bandwidth energy is computed into a device HFE (72) and
coded in (73) into a data designated by E. The output of 73 has been
labelled (3). Each one of the bandwidths LF and HF signals, i.e. rl(n) and
rh(n) is fed into a multirate CE/LTP coder (75), (76) as represented by
(A) and (B) blocks of FIG. 1. Also either separate (b,M) computing devices
or a same one will be used for both bandwidths.
Finally, fed into a multiplexer (77) are the following sets of data:
PARCOR related coefficients: a.sub.i
Pitch or long-term related data: b's and M',s
High frequency energy data: E's
Low bandwidth multi-rate CE/LTP:
##EQU16##
High bandwidth multi-rate CE/LTP:
##EQU17##
This approach enables coding at several rates, with sets of data common to
all rates, i.e. the a.sub.i, b and M parameters and the remaining data
being inserted or not in the output frame according to the following
approaches for instance:
Full band coder with a bit rate of 16 Kbps: add
##EQU18##
Medium band coder:
##EQU19##
Low band coder:
##EQU20##
Lower rate coder:
##EQU21##
Obviously, other types of combinations of outputs (1), (2) and (3),
a.sub.i, b, M and E might be considered without departing from the scope
of this invention.
* * * * *
|
|
|
|
|
Description  |
|