SPEECH ENCODING

Abstract: A method of encoding speech comprising dividing a speech signal into a series of frames, converting each of the frames into a coded signal including filter parameters, allocating consecutive series of frames to segments such that each segment corresponds to a particular language event classification, and quantising the frame or frames in a segment by reference to a codebook specific to the segment classification.

Description: Speech Encoding This invention relates to a method and apparatus for the encoding of speech. Speech encoding commonly includes the separation of speech into an excitation signal and filter parameters defining a spectral envelope, a technique which is known as source - filter synthesis. The envelope specifies a vocal tract transfer function of a speech production mechanism, and the excitation signal represents a stimulus for that mechanism, such that speech is recovered when the signal is applied to the envelope. The separation of speech into excitation and envelope parts is earned out m the time or frequency domain. A set of filter parameters which are used to define the envelope are known as Linear Predictive Coefficients (LPC . These parameters may be transformed into Lme Spectrum Pair LSP parameters which are quantised before being transmitted (or stored) as part of a coded speech system. The coded parameters are received (or retrieved) and decoded; the LPC parameters are thus recovered to define an envelope, and the excitation signal is applied to the envelope to produce synthesised speech. The source - filter model is used because it allows the efficient representation of speech using LSP or other filter parameters and signal parameters. The coding of filter parameters of low bit rate speech coding systems often represents a significant proportion of an overall system bit rate (C. Papanstasiou, C. S. Xydeas, "Efficient mixed excitation models in LPC based prototype interpolation speech coders ", proc. ICASSP 97 pp 1555 - 1558, 1997) and it is therefore of interest to provide efficient coding of filter parameters It is an object of the present invention to provide an improved method and apparatus for encoding speech. According to the invention there is provided a method of encoding speech comprising dividing a speech signal into a series of frames, converting each of the frames into a coded signal including filter parameters, allocatmg consecutive series of frames to segments such that each segment corresponds to a particular language event classification, and quantising the frame or frames in a segment by reference to a codebook specific to the segment classification. The classification of segments into language events (i.e. phonemes or sub- phonemes of a language) allows different codebooks to be designed for each type of event. The invention is advantageous because it allows a reduction in codebook sizes while maintaining quantisation performance, that is it allows the use of relatively small codebooks which are specific to particular language events. Preferably, the method further comprises selecting a predetermined interval corresponding to a series of consecutive frames of speech, dividing the frames within the interval into alternative combinations of segments, and determining that combination of segments which provides the best fit of segments to language events. Preferably, the language event classification of a segment is determined by comparing filter vectors of the or each frame within that segment with an event classification codebook, the event classification codebook comprising a series of classification vectors each of which represents a different language event classification. Preferably, every filter vector of a segment is compared with the event classification codebook. Preferably, the comparison between the filter vectors of a segment and the classification vectors is made using a measure of quantisation distortion. Preferably, the quantisation distortion is deteiτnined using a weighted Euclidean distortion measurement. Preferably, for each segment a measure of the total quantisation distortion is determined from the sum of quantisation distortions for each of the filter vectors of that segment. Preferably, each filter vector is quantised by comparing the vector with vectors in the codebook specific to the segment classification, and selecting from the codebook vectors that vector which yields the least quantisation distortion. Preferably, the segmentation is arranged such that the frames of each segment are either all voiced or all unvoiced. Preferably, the encoding method provides the following data for storage or transmission to a receiver: (i) the start and end point of each segment, (ii) the language event classification of that segment, and (iii) indices of those vectors from the quantisation codebook specific to the segment classification which were used to vector quantise the filter vectors contained within the segment. It is not necessary to transmit the voiced/unvoiced status of a segment, since this is an implicit property of the segment classification. The filter vectors may be LSP vectors. Alternatively, the filter vectors may be LPC vectors. The invention also provides apparatus for performing the above method. A specific embodiment of the invention will now be described by way of example only with reference to the accompanying figures, in which: Figure 1 is a graph showing the variation of LSP parameters with time; Figure 2 is a schematic illustration of the encoding process according to the invention; Figure 3 is a schematic diagram showing the separation of speech into segments; Figure 4 is a schematic diagram shown the segmentation of consecutive intervals of speech; Figure 5 is a schematic illustration of the decoding process according to the invention; Figure 6 is a flowchart illustrating initialisation of the encoding method according to the invention; Figure 7 is a flowchart illustrating the encoding method according to the invention; Figure 8 is a graph illustrating how often quantisation distortion is measured during quantisation during one iteration of the encoding method; Figure 9 is a graph illustrating how often quantisation distortion is measured during quantisation during a further iteration of the encoding method; Figure 10 is a graph illustrating how often quantisation distortion is measured twice during consecutive iterations of the encoding method; Figure 11 is a flowchart illustrating a method of determining quantisation distortion according to the invention; Figure 12 is a flowchart illustrating a method of quantising a speech segment according to the invention; and Figure 13 is a flowchart illustrating the creation of a set of codebooks according to the invention. The vocal tract shape of a speech production mechanism may be defined in a speech encoding/decoding system using Linear Predictive Coefficients (LPC). A set of LPC parameters is known as a vector, and defines the shape of the vocal tract for a given frame of speech (i.e. the short time spectral envelope of the speech). LPC vectors, once determined, are quantised to allow them to be stored or transmitted to a receiver using a minimal amount of bandwidth. In general, LPC quantisation techniques can be classified into two categories. In a first category (category I) spectral distortion is minimised separately for each quantised LPC vector. Well known methods such as Scalar Quantisation, Vector Quantisation (VQ) (A. Buzo, A. H. Gray, R. M. Gray, J. D. Markel, "Speech coding based upon vector quantisation ", IEEE ASSP-28 pp 562 - 574, 1980), Split Vector Quantisation (SVQ) [6] or Finite State Vector Quantisation (FSVQ) (M. O.Dunham, R. M. Gray, "An algorithm for the design of labelled transition Finite State Vector Quantizers ", IEEE Trans. Com Vol. Com-33 pp 83 - 89, 1985) are examples of this type of LPC quantisation. In a second category (category II) evolutions of LPC parameters over time are quantised (i.e. LPC parameters from more than one LPC vector are quantised together). Methods that fall into this category include Matrix quantisation (MQ) (C. Tsao, R. M. Gray, "Matrix Quantizer design for LPC speech using the generalized Lloyd algorithm ", IEEE ASSP-33 pp537-545, 1985), Split Matrix Quantisation (SMQ) ( C.S. Xydeas and C. Papanastasiou, "Efficient coding of LSP parameters using Split Matrix Quantisation ", in Proc ICASSP 95 pp 740 - 743 and Segment Quantisation (SQ) (M. Honda, Y. Shiraki, "Very Low-Bit-Rate Speech coding", in Advances in speech signal processing, Editors S. Furui, M.M. Sondhi, Markel Dekker, 1991 pp 209-230; S. Rocous, R. Schwartz, J. Makkhoul , "Segment quantisation for very low rate speech coding", Proc. ICASSP 1982, pp 1565 - 1568). In the first category of quantisation techniques, the perceptual effect of distortion arising from the quantisation is reduced by minimising the spectral distortion arising from the individual quantisation of each LPC vector. In this case, quantisation distortion which is introduced into a series of LPC parameters over time is effectively random along the series. In the second category, the quantisation distortion is distributed more smoothly over the evolutions with time of LPC parameters. This more even distribution of quantisation distortion diminishes its perceptual effect on the synthesised signal and leads often to improved subjective results, when compared to techniques of the first category operating at the same level of spectral distortion. The embodiment of the invention which is described herein is applied to LPC quantisation methods of the type referred to as category I. It will be understood that the invention may be applied with suitable modifications to category II type LPC quantisation methods. The invention separates a series of LPC spectral parameters into a set of variable length, concurrent, non - overlapping 'evolutions' or 'segments'. This is illustrated in Figure 1, where segments are shown as a series of LSP sets of parameters. The speech at any given frame in time is analysed to yield a vector comprising Line Spectrum Pair (LSP) parameters, which together define the vocal tract shape of a speech production mechanism at that frame. Ten LSP parameters are shown in Figure 1, spaced apart on the vertical axis. The series in time of LSP parameters shown in Figure 1 is broken into segments, which are indicated by vertical lines. The segments represent phonetic 'events' within an input speech signal, and can be quantised according to the type of event that they represent. These events are related to basic phoneme-like sub-sounds or phonemes and since for a given language there exists a limited set of such events, the "variability" in the shapes of spectral evolutions related to a specific type of event is relatively small. This is advantageous because it allows segments of spectral parameters, once classified to particular events, to be vector quantised more efficiently than would be the case when no segmentation and classification is performed. Each segment consists of sets of LPC parameters (i.e. LPC vectors), which are transformed into LSP vectors; these LSP vectors which belong to the same class are quantised. Quantisation of LSP vectors is achieved by locating within an appropriate codebook the set of LSP parameters which correspond most closely to the input set of LSP parameters to be quantised. The coefficients of that set of LSP parameters in the codebook become the quantised representation of the input LSP vector The codebook used is specific to the event (phoneme or sub-phoneme) classification of that segment. Figure 2 shows schematically a method for the determination and encoding of LPC coefficients according to the invention A 20ms frame of speech held in a buffer provides an input for the method The short time spectral envelope of the speech is represented as a set of LPC parameters (i.e. an LPC vector), which are converted to LSP parameters. A small bandwidth expansion is applied to the LPC parameters before they are converted to LSP parameters This prevents 'metallic' sounds occurnng due to sharp peaks, which may otherwise anse m the spectral envelope The expansion is repeated during decoding, as discussed below m relation to Figure 5 Simultaneous to the calculation of the LPC parameters of the frame, the energy of the frame is determined, and a decision is made as to whether the frame is voiced or unvoiced. The operations illustrated m the remainder of Figure 2 will be described with reference also to Figure 3, which is a schematic representation of speech comprising a series of LSP frames. LSP vectors are calculated for each frame (i.e. once every F msecs; in this case 20 ms) using non-overlappmg LPC analysis frames. L, LSP" 1 , (j=l ...L, in this case L is 10) vectors are concatenated together to produce an m Λ (X = L*F msecs, in this case 200 ms) matrix of LSP parameters, {lsp m J k } , (k = 1, 2, ..., p, where p is the number of parameters comprising an LSP vector; in this case p = 10). The m* matnx of LSP parameters is the input to an integrated segmentation and quantisation method according to the invention. This method segments a X msecs (200 ms in Figure 3) LSP speech interval (referred to hereafter as an optimisation interval) into a number of segments by means of inserting borders {B m ,} (i = 1, 2, ...B m tot ) at appropnate locations within the optimisation interval. The borders {B™} are indicated m Figure 3 by diagonal hatching on the LSP vectors. The number of borders B m ^ inserted into the interval must be less than or equal to a maximum number of allowed borders B π] _ Note that B ma controls indirectly the rate of separate segments produced and quantised per second. Segments are each given a classification ξ m , (1 = 1, 2, ..., B 10l ) The individual LSP vectors within each segment are quantised using a conventional Vector quantisation (VQ) or split VQ (SVQ) process. Quantisation is achieved using a codebook CB ξ ' , the choice of codebook being determined by the phoneme (or sub- phoneme) class ξ, of the i* segment, ξ, = 1, 2, ..., C. When an optimisation interval is segmented, the distortion ansing from quantisation of the LSP vectors of that interval is determined. Although the interval is divided into segments which may contain a plurality of LSP vectors, every vector is quantised Other possible segmentations of the optimisation interval are used, and the distortion ansing from quantisation is again measured, until an optimum arrangement of segments is found. In this way the segment borders (i.e. {B m ,} ) are placed in such a manner as to minimise the resulting quantisation distortion. Thus, an important charactenstic of the invention is that the quantisation method is performed as an integral part of segmentation. Note that a voiced / unvoiced classification of each LSP vector is performed and the segmentation is designed to yield segments which are composed of only voiced or only unvoiced LPC frames. Once quantisation of an optimisation interval has occurred, the following information is transmitted (or stored) in relation to the i Λ segment of the m* optimisation interval: 1. The positions of the start and end points of the segment i.e. B m ,_, and B ,. A simple differential code , B m , - B m . . , is used to encode this information. 2. The segment classification ξ m ,. 3. The indices {v 1 .} of the CB ξ < vectors 0 = 1 . 2, ...) used to quantise the individual LSP m ; vectors of the i Λ segment. Note that when split-vector quantisation is used, more than one index is transmitted per LSP m _ vector. Since all frames in a segment are either voiced or unvoiced, and the voicing status of a segment can be determined from it's classification ξ" , the system also implicitly transmits (or stores) the voicing status for each LPC frame The above information is transmitted for all except for the last N segments of an X msecs (200 ms) speech interval, where N is a fixed system parameter The LSP"\ vectors of the last N segments are retained and considered with those of the next X msecs optimisation interval as shown m Figure 4 This is done because the start and end points of a segment influence the definition of neighbounng segments. For example, a better segmentation of an initial portion of an (m+l) 111 speech interval will be obtained when particular LSP m y vectors are used from an m* speech interval. An overlap of N segments exists between the X and (m+l) 111 speech intervals, and this means that only B tot - N segments are quantised and transmitted for the m" 1 interval. Thus, the possibility of the segmentation becoming "non optimal" at borders between speech intervals is reduced by overlapping the signal intervals over which the segmentation is performed. Note that the end of the last segment does not have to coincide with the end of the speech interval, and after the final segment is defined there may be some additional "independent" LSP m , vectors which do not belong to any segment. These independent LSP" 1 , vectors become part of the next speech interval and are segmented as part of that interval. There is a maximum number L end of independent LSP" 1 , vectors allowed by the system. In the case where the total number of segments produced within an optimisation interval is less than N, at least one segment from that interval is quantised and transmitted even if this means that no segments can be retained for the next optimisation interval. This ensures that the method does not become locked into a loop which constantly optimises the same set of LSP" 1 , vectors, having retained an entire optimisation interval. Information transmitted following encoding as described above in relation to Figure 2 is received at a receiver and decoded. The method used to decode the received information ( {B ra .}, {ξ m , } and {v 1 . }) is illustrated in Figure 5. The positions of the {B, m } borders between segments are recovered and the classifications ξ m , of segments are used to select appropriate codebooks for the VQ / SVQ decoding of the LSP m j vectors that make up each segment (i.e. the codebook which contains LSP m j .- vectors for the phoneme event contained within that segment). Thus, LSP" vectors are recovered by selecting the individually quantised LSP "-' vectors of each segment "i" from the correct CB^ codebooks using the received codebook indices, {V'j} . Once the LSP m y vectors have been recovered as ^ J vectors they are converted to Linear Predictive Coefficient (LPC) vectors before undergoing a bandwidth expansion. The expanded LPC vectors will then reflect the short time spectral envelope of the speech which was encoded as described in relation to Figure 2 above. The integrated segmentation and quantisation (SQ) algorithm which is used to segment an X msecs optimisation interval will now be described in detail with reference to Figures 6 and 7. The algorithm is a dynamic programming (DP) based algorithm which minimises the overall quantisation distortion for all of the segments which make up the optimisation interval. Complexity reduction strategies are employed both in the DP algorithm itself and in the quantisation algorithm, and these are discussed later with reference to Figure 12. "Quantisation distortion" in this context is defined to be the total distortion produced when all LSP m . vectors of an optimisation interval are quantised (a method used to determine quantisation distortion is described below with reference to Figure 11). The output from the segmentation algorithm is a set of borders, {B ™} defining the positions of the endpoints of segments within the m" 1 X msecs optimisation interval. The starting point for the n Λ segment is defined to be B n _, m +1 and the endpoint B n m . Thus, an nth segment consists of the vectors { LSP m ; } j = B-^+l, B„ .1 m +2, ..., B n m . The initialisation of the integrated segmentation and quantisation process requires: 1. An optimisation interval, { LSP'" 7 } j = 1, 2, , L The length X of the interval, is defined as L times F msecs where F is the LPC analysis frame size Typical values for L and F are 10 and 20ms and thus X=200ms 2. A voiced / unvoiced flag for each LPC frame within the optimisation interval (the optimisation interval is equivalent to the speech interval) 3. A speech energy estimate for each LPC frame withm the optimisation interval 4. A minimum allowable segment length, L mιn 5. A maximum allowable segment length, L max 6. A maximum number of segment borders B nι _- 7. A maximum allowable number L^ of LSP m , vectors, between the end of the final segment and the end of the optimisation interval (see Figure 4) 8. An 'event codebook' { ECB ξι } ξ, = 1, 2, 3, , C for the classification of segments C represents the number of allowable 'events' or 'classifications' (i.e the number of phonemes or sub-phonemes). 9. A set of C codebooks { CB } (I e. one codebook for each allowable 'event') to be used in the quantisation of the LSP vectors of M segments identified within an X msec optimisation interval The initialisation process, as illustrated m Figure 6, is as follows A. Set a counter 'n' to 1. B Define an array, [α 1 "] whose (n y element is the optimal (mmimum) total quantisation distortion for all segments from the beginning of the optimisation interval up to a pomt i, given that the endpoint of the n Λ segment is positioned at point l withm the optimisation interval. Set α 00 = 0. C. Define an array [ • * ]to be the position of the endpoint of the optimally determined (n-l) 4 segment, given that the endpoint of the n Λ segment is positioned at point l withm the optimisation interval. Set β 00 = 0 D. Define the variables "min"' and "max"' (i = 1, 2, ..., B m _J. min' is the minimum point at which the i t segment can have its endpoint. max' is the maximum point at which the i th segment can have its endpoint. Note that min 0 and max ° are zero. E. Set the variable "min distortion" to a large value. This is the minimum attainable quantisation distortion when up to B mκ endpoints are allowed in the optimisation interval and the endpoint of the final segment is within the L end range (See Figure 4). (note that since each segment contains only voiced frames or unvoiced frames and in order for the dynamic programming to conform to this condition L mιn is set to 1). F. Determine the number of voiced / unvoiced transitions within the optimisation interval, N^ and their positions, VUN„ i = 1, 2, ..., N^. Let L^^^ to be the number of frames between the final voiced / unvoiced transition (VUN Nvun ) and the end of the optimisation interval. Apply the following conditions: (i) If N^ < B^ and L^.^ < L end + L^ B^ - N^ then take no action. This condition covers the case that enough borders B , are available to the dynamic programming (DP) algorithm to yield separate segments for each of the voiced / unvoiced signal periods in the m 01 optimisation interval whilst keeping to the L end condition. (ll) If N yun <. B- nax and L^ end > L end + L--^ (B-^ - - TJJ J set L end = L^^ - L^-. (B-^-. - N.- J -,). This condition covers the case that enough borders B™ are available to the DP algorithm to yield separate segments for each of the voiced / unvoiced periods in the m" 1 optimisation interval, but only if the L^ condition is modified. Thus L end is modified accordingly. (iii) If N.- J -, > B^, set L end to be equal to L minus the position of that voiced / unvoiced transition, out of the N^ transitions, which is B^* from the beginning of the optimisation interval; i.e. L end = L - VUN Bmax . This condition covers the case of not enough borders B m ; being available to the DP algorithm to yield separate segments for all of the voiced / unvoiced signal periods. In this case, eπά is modified such that the m"' optimisation interval is shortened to include only as many voiced / unvoiced transitions as there are B m , available borders. This final stage of the initialisation process ensures that the dynamic programming algorithm can choose borders for the speech interval in positions such that no segment contains a mixture of voiced and unvoiced frames whilst ensuring as far as is possible that the initial value of L end is observed. Once initialised, the combined segmentation and quantisation algorithm, as shown in Figure 7, proceeds as follows: A. Set min" = min" "1 + L mιn and max" = max" "1 + L- ^ -. B. Set i = min". C. Set j = min" "1 and α"' 1 equal to a large number. If j < i - L-^, set j = i - L max . D. Calculate the total quantisation distortion λ for the LSP m ; - vectors in a segment running from a starting point j + 1 to an endpoint point i within the optimisation . P interval. Set p = λ + oc n -' J . E. If p < α n i , set α"- 1 = p and β"' 1 = j. F. Increment j. If j < max" "1 and j < i - L^ go to step D. G. If the length of the optimisation interval L, minus i is less than L end , and α"' 1 < min_distortion, set min_distortion = α"' 1 , B tot = n and final_endpoint = i. H. Increment i. If i < max", go to step C. I. Increment n. If n < B^, go to step A. The above method provides a table of quantisation distortions α n ι each entry of which gives the total quantisation distortion when n segments are to be chosen and a final segment has its endpoint position at i. It also provides a table of endpoint positions ^ the entries of which give the endpoint of the n-l ft segment if the n* segment ends at point i and the segmentation up to point i is optimal in a minimum quantisation distortion sense. In addition, the required number of segments and the endpoint of the final segment that is required for a 'globally' optimised segmentation within the interval given the (B^, L-^, L^, L end ) constraints are obtained. Now given that the n lh segment ends at point i, β"' 1 represents the optimal position for the endpoint of the (n-1)"' segment i.e. B m n _,. Furthermore, β" ~] ' B "-' is the optimal endpoint of the (n-2) th segment. In this way, a backward recursion generates the optimal positions of the B tot endpoints. That is: J. Set n to be B tot . Set i = fmal_endpoint. Set B m n = i. K. Set i = β n ' j and B m n ., = i. L. Decrement n. If n > 1, go to step K. Notice that the number of segments placed within the optimisation interval is allowed to be less than (but not greater than) the original B max . This allows the algorithm to select optimally B tot segments where B tot < . B^. In step D of the segmentation and quantisation algorithm, the quantisation of a segment to obtain λ (the total quantisation distortion) is performed for a given set of n, j and i values (n is the number of incrementations of the algorithm, j denotes the starting point of a segment, and i denotes the ending point of a segment). There exists considerable computational redundancy in this arrangement, since a segment with a given start and endpoint may be quantised more than once. Specifically, each time n is incremented, a certain proportion of segment start and endpoints are re-examined. This is illustrated in Figures 8 and 9 (Figure 8 shows (j,i) combinations for which λ is calculated at stage 'n', and Figure 9 shows (j,i) combinations for which λ is calculated at stage 'n + 1'). In these figures, L = 10 (the number of frames), L rnin = 1 (minimum number of frames per segment), L^ = 8 (maximum number of frames per segment), m f= 3 (minimum point at which segment can have its endpoint), max" = 10 (maximum point at which segment can have its endpoint) and comp = 1 indicates the sets of "j" start and "i" endpoints for which λ is calculated in the n" 1 (Figure 8) or (n+1)" 1 (Figure 9) stage of the algorithm. Figure 10 shows the combinations of (comp = 2 ) "j" start and "i" endpoints for which λ is calculated in both the n Λ and (n+l) Λ stages. Clearly, there is a considerable overlap, and due to the finite size of the optimisation interval, the larger n becomes, the fewer combinations of start and endpoint exist for which λ (the total quantisation distortion) has not already been calculated. Furthermore, since a certain number of LSP m ; vectors are kept and fed into the next stage of the process, then even when n = 0, λ has already been calculated for many segments. This repeated quantisation of the same set of LSP vectors can be avoided if the quantisation distortion λ, relating to the quantisation of a particular segment, is stored the first time the quantisation of this segment is performed, and is then retrieved when the same value of quantisation distortion is required at later stages. Thus, a further array, [r 1 ] , j = 1,2, ..., L, i = 1, 2, ..., L is introduced. The quantisation distortion of a segment, defined by the (j,i) start and endpoint values, is stored in this array and retrieved when required. Step D of the above segmentation algorithm is therefore altered as follows: D. Test whether, the total quantisation distortion λ, for the LSP vectors in a segment running from point j to point i within the optimisation interval has been previously calculated and stored in r 1 . If so, set λ = if' 1 . Otherwise, perform the quantisation to calculate λ and set η J '' = λ. Set p = λ + α n"1J . At the end of the optimisation process operating over the ^ X msecs interval, the values [if' 1 ] are shifted by σ, where σ is the position of the endpoint of the final LSP segment of the m* interval. In this way, certain values of λ which have been calculated during the m* interval are available within [η j ''] for the segmentation of the (m+l) th interval. The storage in [η I ] of intermediate quantisation distortion results, although requiring a maximum of 55 elements of extra storage space (assuming L = 10), reduces considerably the computational complexity of the segmentation and quantisation of a series in time of LSP vectors. As mentioned above, part of stage D is the quantisation of the { LSP" 1 ; } vectors of a segment such that the quantisation distortion λ is returned to the segmentation algorithm. In this embodiment, a weighted Euclidean quantisation distortion measure is used. Specifically, the distortion arising from quantising the j* LSP m . vector with the i Λ codebook vector cb t is calculated as follows: d(j) = ∑ Wj (lsp m j - cb l,k (1) k=] where lsp m . k are the individual elements of LSP" 1 , ,and w. k is a weighting function based on the energy of the frame and the spectral distribution of the energy [C.S. Xydeas and C. Papanastasiou, "Efficient coding of LSP parameters using Split Matrix Quantisation ", in Proc ICASSP 95 pp 740 - 743]. The total distortion £>. for a segment of length L s is given by: D s = ∑d(m) (2) m=l No segment length related normalisation of the weighted distortion measure is carried out. This is because the segmentation algorithm aims to minimise the quantisation distortion of each individual LSP m . vector. If D s were normalised, an average value for the quantisation distortion within the segment would be returned which would not allow the DP algorithm to minimise the quantisation distortion of individual LSP vectors. The above quantisation distortion measure is used as part of a two stage multi- codebook vector quantisation of a segment method as follows: Stage 1; Classification The 'event' (phoneme or sub-phoneme) classification (ξ ; = 1, 2, ... C) of an i ώ segment of an optimisation interval (i.e. a series of frames of speech) is obtained. This is performed using the 'event codebook' {ECB ξ ' }. Each entry of the event codebook consists of a single LSP vector representative of a particular event and is used to individually quantise in turn all the LSP™, vectors of the segment. The quantisation distortion d(j) arising from the approximation of each LSP m / vector of the segment using a given event codebook entry (i.e. a given phoneme or sub-phoneme) is calculated and summed to produce a total quantisation distortion, D s ξ for that segment. This is repeated for all event codebook entries (i.e. all phonemes), and the codebook entry which results in the lowest D- . value is selected (i.e. the index of the ξ, event codebook entry which results in the lowest D_ , value is selected) as the classification of the { LSP m j } evolution. This may be represented as: A ξι = mιn ^^ w J k 2 lsp m j,k - ecb ξ ' kf ξ, = 1, 2, ..., C (3) 7 = 1 k = \ and = -§ . (4) where ecb ξ 'k are the individual elements of the ξ * codebook vector ECB^ . Distortion measurement according to the invention is shown schematically in Figure 11. The basic process of the classification stage is thus to compare the input LSP m / to the ECB ξ codebook vectors and chose the event codebook index which yields minimum distortion over all LSP m ; vectors of a segment. The Euclidean distortion d(j) must be calculated repeatedly for each LSP / . Thus, in order to enhance efficiency during the classification stage, a new array [ φ 1 '^ ] is introduced. The array stores the distortion measure calculated between the input vector LSP m ; at a point j and the ξ* entry ECB^ of the event codebook. During the classification stage, at each point in the j = 1 to L s summation [ φ 1 '^ ] is examined to see whether the distortion measure has already been calculated for the particular combination of j and ξ,. If it has indeed been calculated then the distortion is taken directly from the array [<X'^ ]. Otherwise, the distortion is calculated and stored in [ 1 '^ ]. Again, the introduction of [p*'^ ] represents a trade off between the computational time saved and the additional storage required for [ φ'^ ]. Stage 2, Quantisation Once the i"' segment of a speech interval has been classified to ξ, = τ, a quantisation codebook CB T is selected according to the classification of the segment The quantisation codebook CB T is a set of entries all of which represent vanations of a particular event (phoneme or sub- phoneme). The quantisation codebook is used to vector quantise or split-vector quantise the individual LSP vectors of a segment. It should be noted that all of the LSP vectors of a given segment are quantised using the same event codebook, but that different entnes of that codebook may be used to quantise different LSP vectors. The quantisation distortion ansing from the quantisation of each individual LSP vector is summed to obtain a total segment quantisation distortion λ, i.e Λ = nun υ γ j w (lsp m J ,k - cb τ υ ,k) 2 (5) 7=1 k=\ where cb T υ ,k (ε = 1, 2, ..., CBS ξ ' ) represent the individual elements of Cδ r and CBS T is the size of the codebook. Note that equation (5) applies to the case where VQ is used for the quantisation. The process of quantising an { LSP m y } segment is shown schematically in Figure 11. It may appear that the classification stage (i.e. stage I) is unnecessary, and the quantisation stage (i.e. stage IT) alone could be used to calculate the values λ, for the entnes of all of the quantisation codebooks { CB ξ ' }. Although it is possible to do this, the increase of computational complexity that would be required is such that the overheads required for real time operation would become prohibitive, particularly when there exist a large number of possible events. The use of the phoneme classification stage according to the invention allows input LSP tracks to be divided into segments whose parameters evolve slowly in time. Thus, an LSP vector which represents an area of "spectral space" (i.e. a particular phoneme) can be used in the initial classification stage to effectively "rule out" other CB ς ' codebooks containing LSP vectors residing in different areas of the "spectral space" (i.e. other phonemes). When the spectral characteristic of a segment evolves rapidly, the possibility arises that poor classification would cause an increase in quantisation distortion, since a non optimal CB^ 1 codebook would be selected for quantisation. However, the invention avoids this problem during the segmentation process by rejecting candidate positions of segments with LSP parameters which change rapidly. The method according to the invention may be modified such that the classification stage selects a number of possible candidate language event classifications for a given segment (for example, five possible classifications) which are ordered in terms of preference. The most preferred classification (i.e. the one which yields the lowest quantisation distortion) for each segment is used when deterrriining the combination of segments which provides the best fit of segments to language event classifications. Once the segment borders have been established, the filter vectors comprising each segment are quantised. The filter vectors are quantised using the codebooks associated with each of the possible candidate language event classifications, and the classification which yields the least quantisation distortion is retained. The other classifications are then discarded. Experimental investigations have indicated that this alternative method is not advantageous when compared to the unmodified method, unless the number of possible phoneme classifications is greater than 256. Given the index υ, of an entry of a quantisation codebook CB$ , the resulting quantisation distortion remains the same when quantising a j" 1 LSP m _ vector of an m th optimisation interval for a given classification ξ s of an i* segment to which LSP m y belongs, regardless of the start and endpoints of the segment. In other words, during quantisation of a segment of a given optimisation interval, once a classification ξ ; has been found for that segment then the effect of quantising a particular LSP vector of that segment will stay the same regardless of the positions of the start and endpoints of that segment. This is because it is reasonable to expect that a set of LSP evolutions with similar start and endpoints will have that same classification, and thus the same CB ς ' will be used to quantise on several occasions the same LSP vector LSP m related to several start / endpoint segments. Thus storing the result of the quantisation of an LSP vector, given that it belongs to a segment with classification ξ, can result in a further reduction in the complexity requirements of the algorithm. A further array, [ζl ξ < ] is used to store the quantisation distortion resulting from the quantisation of vector LSP m , , using the codebook CB ξ < . Thus during quantisation, once a classification (ξ,) has been obtained, [Ω- 7 '^ ] is examined for each LSP m , vector to establish whether the vector has already been quantised using CB ξ ' . If this is so, the quantisation distortion is recovered from the array. Otherwise LSP m y is quantised and the resulting distortion value is entered in [Ω y '^ ]. This method requires an additional storage location to be provided for each possible event classification. A flowchart for the above computationally efficient quantisation method is shown in figure 12. When the complexity reduction method is employed in the quantisation stage, the short term complexity of the algorithm becomes variable and dependent upon the "local" input signal characteristics. This is because the number of possible classifications for a vector LSP m . at point j, and hence the number of times a CB^ quantisation must be performed depends upon the nature of the signal at either side of the vector LSP m . The "average" complexity of the algorithm is significantly less than the maximum possible complexity. Once the dynamic programming based segmentation algorithm has determined the positions of the segments, the segment classifications {ξ™ } and codebook indices {V j 1 } of the LSP m y vectors of each segment must be obtained. Two equivalent methods may be used to achieve this. The first method is requires more computation while the second method has a larger memory requirement. Method 1: Once the positions of the start and endpoints of segments are known, the LSP vectors of segments are quantised to determine their event classification and LSP codebook indices. Method 2: Define an array [ψ J,1 J to represent the classification of a segment that begins at point j and ends at point i. Modify stage D of the segmentation algorithm as follows: D. Test whether the total quantisation distortion, λ, for the LSP vectors in a segment running from point j to point i within the m* optimisation interval has been previously calculated and stored in η Jt ' . If so, set λ = η Jι ' . Otherwise, perform the quantisation, calculate λ set rr 1,1 = λand [ψ J ''] = ξ,. Set p = λ + α n" '°. Define an array [& ■ ] which stores the indices of the LSP" 1 ; vectors in the segment running from j to i. These can easily be stored at the same time as the quantisation distortions are calculated for the segment. The classification of segment n can now be recovered by setting ξ™ - ψ B" '- B"' '" . The indices of the individual LSP m , vectors of the segment are recovered from [& • ']. Multi -codebook vector quantisation according to the invention requires a suitable 'event codebook' {ECB^ } for the classification of segments and 'quantisation codebooks' { _5 < * } for quantising individual segment vectors LSP 7 . A method via which these codebooks may be created is described below. The multi-codebook vector quantisation (MCVQ) codebook creation method involves two sub processes, a first of which provides the { ECB } codebook, and a second of which provides { CB 1 } . Event codebook ' The 'event codebook' { ECB* } is generated using an iterative process which requires an input of several hours of training speech. Repeated iterations of the process result in an increase of the size of the event codebook. The process can be summarised as follows: A. Begin with an initial event codebook {ECB^ }° 2 which contains two vectors; one corresponding to all unvoiced events and the other to all voiced events. Define the codebook size, m, to be 2 and n, the number of iterations (for a given size m) to be 0. Set D„ 0.1. B. Convert the input training speech database into a large set of LSP vectors. C. Using the codebook {ECB^ } n m and a modified MCVQ segmentation algorithm (see below) segment the training set into discrete segments. D. Determine the classification for each segment of the segmented training set, using 'stage 1 ' of the quantisation algorithm. E. Modify the codebook { ECB } n m to more optimally represent the training set. Determine the total 'Classification quantisation distortion' D cl n F. Calculate (D cl n - D.," "1 ) / D cl n" '. If the result is above a pre-set threshold ε, increment n and repeat from step C. G. If m is less than the required size M of the codebook, increase the size of the codebook from m to 2m. Set n = 0 and repeat from step C. The modified MCVQ segmentation algorithm mentioned in step C is the same as the MCVQ algorithm described earlier with the following modifications: (i) No classifications or quantisation indices are generated. Instead, the segments generated in each optimisation interval are stored separately for subsequent codebook fr-iining. (ii) The quantisation section of the algorithm only carries out stage 1 (i.e. classification) and not stage 2 (i.e. quantisation of an LSP vector) Instead of the quantisation distortion λ, the 'classification distortion' (Dξ),-^ is fed back from the quantisation section to the DP algorithm. In other words, the event codebook { ECB ξl }" m itself is used to quantise the individual LSP™ vectors, with each LSP m 7 within a segment being quantised to the same ECB^ vector that classifies the segment. In step E, an existing { ECB ξ ' }" m codebook is modified using the new training set as follows: El Start with ξ = 0 and D cl " = 0. E2 Denote each training set segment which has been classified by ξ as LSP s where (j=l, 2, ..., L s ), L s denotes the length of segment s and s is the index of the segment within the set of S segments that have been classified as ξ. E3 Calculate S L, p DEN (7) _=1 ;=\ k=\ where lsp s j k are the individual elements of LSP S , are the individual elements of ECB ξ and w s j k is a weighting function for each LSP value based on i) the energy of the frame from which the LSP came and ii) the spectral distribution of the energy. -π+l E4 Update the value of ECB ξ< n+1 m using ECB ξ ' m = NUM I DEN E5 Increment ξ. If ξ < m repeat from E2 In step G, the size of the codebook is doubled by adding a small random vector to each vector of {ECB ξ } n m and retaining the old vectors to give a new codebook { ECB^ }°,. m consisting of the old { ECB^ }" m vectors together with the pertubated vectors. The above process generates { ECB ξ } n m codebooks with equal numbers of voiced and unvoiced segment classifications. When unequal numbers are required, this can be achieved by modifying stage G to obtain a non uniform "splitting" of codebook entries. "Quantisation codebooks " After an event codebook { ECB ξι } of the desired size and composition has been produced, the next step is to design a set of quantisation codebooks { CB^ } corresponding to possible event classifications. For this purpose, the final segmented input training set of the process above is retained and again each segment is classified. The individual LSP m ; vectors of the segments are then collected into C training sets of individual LSP vectors, where C is the number of classifications. The LSP m vectors of each training set come from segments which have all been given the same classification. Each training set is used to generate a VQ / SVQ codebook of size CBS ξ using the Generalised Lloyd Algorithm (GLA). These codebooks are collected together and form the set of quantisation codebooks { CB ξ < } corresponding to the classification codebook { ECB 1 * } . The full MCVQ training algorithm is shown in Figure 13

Claims: Claims 1. A method of encoding speech comprising dividing a speech signal into a series of frames, converting each of the frames into a coded signal including filter parameters, allocating consecutive series of frames to segments such that each segment corresponds to a particular language event classification, and quantising the frame or frames in a segment by reference to a codebook specific to the segment classification. 2. A method of encoding speech according to claim 1, wherein the method further comprises, for a predetermined interval corresponding to a series of consecutive frames of speech, dividing the frames within the interval into alternative combinations of segments, and determining that combination of segments which provides the best fit of segments to language events. 3. A method of encoding speech according to claim 1 or 2, wherein the language event classification of a segment is determined by comparing filter vectors of the or each frame within that segment with an event classification codebook, the event classification codebook comprising a set of classification vectors each of which represents a different language event classification. 4. A method of encoding speech according to claim 3, wherein every filter vector of a segment is compared with the event classification codebook. 5. A method of encoding speech according to claim 3 or 4, wherein the comparison between the filter vectors of a segment and the classification vectors is made using a measure of quantisation distortion. 6. A method of encoding speech according to claim 5, wherein the quantisation distortion is determined using a weighted Euclidean distortion measurement. 7. A method of encoding speech according to claim 5 or 6, wherein for each segment a measure of the total quantisation distortion is determined from the sum of quantisation distortions for each of the filter vectors of that segment. 8. A method of encoding speech according to any preceding claim, wherein each filter vector is quantised by comparing the vector with vectors in the codebook specific to the segment classification, and selecting from the codebook vectors that vector which yields the least quantisation distortion. 9. A method of encoding speech according to any preceding claim, wherein the segmentation is arranged such that the frames of each segment are either all voiced or all unvoiced. 10. A method of encoding speech according to any preceding claim, wherein the encoding method provides the following data for storage or transmission to a receiver: (i) the start and end point of each segment, (ii) the language event classification of that segment, and (iii) indices of those vectors from the quantisation codebook specific to the segment classification which were used to vector quantise the filter vectors contained within the segment. 11. A method of encoding speech according to any previous claim, wherein the filter vectors are LPC vectors. 12. A method of encoding speech according to claim 11, wherein the filter vectors are LSP vectors. 13. An apparatus for encoding speech configured to perform the method as described in any of claims 1 to 12. 14. A method of encoding speech substantially as hereinbefore described with reference to the accompanying drawings. 15. An apparatus for encoding speech substantially as hereinbefore described with reference to the accompanying drawings.

Inventors: XYDEAS COSTAS, XYDEAS, COSTAS
Applicants: UNIV MANCHESTER, XYDEAS COSTAS, THE VICTORIA UNIVERSITY OF MANCHESTER, XYDEAS, COSTAS
Application year: 1999
Main classification: G10L9
IPC codes: G10L19