The present invention relates in general to signal coding, and in particular to speech/audio signal coding. More in detail, the present invention relates to coding and decoding of speech/audio signal via the modeling of a variable number of codebooks, proportioning the quality of the reconstructed signal and occupation of memory/transmission bandwidth. The present invention find an advantageous, but not exclusive, application in speech synthesis, in particular corpus-based speech synthesis, where the source signal is known a priori, to which the following description will refer without this implying any loss of generality.
In the field of speech synthesis, in particular based on the concatenation of sound segments for making up the desired phrase, the demand arises to represent the sound material used in the synthesis process in a compact manner. Code Excited Linear Prediction (CELP) is a well-known technique for representing a speech signal in a compact manner, and is characterized by the adoption of a method, known as Analysis by Synthesis (A-b-S), that consists in separating the speech signal into excitation and vocal tract components, coding the excitation and linear prediction coefficients (LPCs) for the vocal tract component using an index that points to a series of representations stored in a codebook. The selection of the best index for the excitation and for the vocal tract is chosen by comparing the original signal with the reconstructed signal. For a complete description of the CELP technique reference may be made to Wai C. Chu, Speech Coding Algorithms, ISBN 0-471-37312-5, p. 299-324. Modified versions of the CELP are instead disclosed in US 2005/197833, US 2005/096901, and US2006/206317.
The Applicant has noticed that in general in the known methods the excitation and the vocal tract components are speaker-independently modeled, thus leading to a speech signal coding with a reduced memory occupation of the original signal. On the other hand, the Applicant has also noticed that the application of this type of modeling causes the imperfect reconstruction of the original signal: in fact, the smaller the memory occupation, the greater is the degradation of the reconstructed signal with respect to the original signal. This type of coding takes the name of lossy coding (in the sense of information loss). In other words, the Applicant has noticed that the codebook from which the best excitation index is chosen and the codebook from which the best vocal tract model is chosen do not vary on the basis of the speech signal that it is intended to code, but are fixed and independent of the speech signal, and that this characteristic limits the possibility of obtaining better representations of the speech signal, because the codebooks utilized are constructed to work for a multitude of voices and are not optimized for the characteristics of an individual voice.
The objective of the present invention is therefore to provide an effective and efficient source-dependent coding and decoding technique, which allows a better proportion between the quality of the reconstructed signal and the memory occupation/transmission bandwidth to be achieved with respect to the known source-independent coding and decoding techniques.
This object is achieved by the present invention in that it relates to a coding method, a decoding method, a coder, a decoder and software products as defined in the appended claims.
The present invention achieves the aforementioned objective by contemplating a definition of a degree of approximation in the representation of the source signal in the coded form based on the desired reduction in the memory occupation or the available transmission bandwidth. In particular, the present invention includes grouping data into frames; classifying the frames into classes; for each class, transforming the frames belonging to the class into filter parameter vectors; for each class, computing a filter codebook based on the filter parameter vectors belonging to the class; segmenting each frame into subframes; for each class, transforming the subframes belonging to the class into source parameter vectors, which are extracted from the subframes by applying a filtering transformation based on the filter codebook computed for the corresponding class; for each class, computing a source codebook based on the source parameter vectors belonging to the class; and coding the data based on the computed filter and source codebooks.
The term class identifies herein a category of basic audible units or sub-units of a language, such as phonemes, demiphones, diphones, etc.
For a better understanding of the present invention, a preferred embodiment, which is intended purely by way of example and is not to be construed as limiting, will now be described with reference to the attached drawings, wherein:
The following description is presented to enable a person skilled in the art to make and use the invention. Various modifications to the embodiments will be readily apparent to those skilled in the art, and the generic principles herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein and defined in the attached claims.
In addition, the present invention is implemented by means of a computer program product including software code portions for implementing, when the computer program product is loaded in a memory of the processing system and run on the processing system, a coding and decoding method, as described hereinafter with reference to
Additionally, a method will now be described to represent and compact a set of data, not necessarily belonging to the same type (for example, the lossy compression of a speech signal originating from multiple sources and/or a musical signal). The method finds advantageous, but not exclusive application to data containing information regarding digital speech and/or music signals, where the individual data item corresponds to a single digital sample.
With reference to the flowchart shown in
Hereinafter each individual data-processing step will be described in detail.
1. Classification and Grouping of Data
In this step, the available data is grouped into classes for subsequent analysis. Classes that represent the phonetic content of the signal can be identified in the speech signal. In general, data groups that satisfy a given metric are identified. One possible choice may be the subdivision of the available data into predefined phonetic classes. A different choice may be the subdivision of the available data into predefined demiphone classes. The chosen strategy is a mix of these two strategies. This step provides for subdivision of the available data into phonemes if the number of data items belonging to the class is below a given threshold. If instead the threshold is exceeded, a successive subdivision into demiphone subclasses is performed on the classes that exceed the threshold. The subdivision procedure can be iterated a number of times on the subclasses that have a number of elements greater than the threshold, which may vary at each iteration and may be defined to achieve a uniform distribution of the cardinality of the classes. To achieve this goal, right and left demiphones, or in general fractions of demiphones, may for example be identified and a further classification may be carried out based on these two classes.
2. Selection of the First Data Analysis Window
In this step, a sample analysis window WF is defined for the subsequent coding. For a speech signal, a window that corresponds to 10-30 milliseconds can be chosen. The samples are segmented into frames that contain a number of samples equal to the width of the window. Each frame belongs to one class only. In cases of a frame overlapping several classes, a distance metric may be defined and the frame assigned to the nearest class. The selection criteria for determining the optimal analysis window width depends on the desired sample representation detail. The smaller the analysis window width, the greater the sample representation detail and the greater the memory occupation, and vice versa.
3. Transformation of the Frames into Filter Parameter Vectors
In this step, the transformation of each frame into a corresponding filter parameter vector, generally know as codevector, is carried out through the application of a mathematical transformation T1. In the case of a speech signal, the transformation is applied to each frame so as to extract from the speech signal contained in the frame a codevector modeling the vocal tract and made up of LPCs or equivalent parameters. An algorithm to achieve this decomposition is the Levinson-Durbin algorithm described in the aforementioned Wai C. Chu, Speech Coding Algorithms, ISBN 0-471-37312-5, p. 107-114. In particular, in the previous step 2, each frame has been tagged as belonging to a class. In particular, the result of the transformation of a single frame belonging to a class is a set of synthesis filter parameters forming a codevector FSi (1<i<N), which belongs to the same class as the corresponding frame. For each class, a set of codevectors FS is hence generated with the values obtained by applying the transformation to the corresponding frames F. The number of codevectors FS is not generally the same in all classes, due to the different number of frames in each class. The transformation applied to the samples in the frames can vary as a function of the class to which they belong, in order to maximize the matching of the created model to the real data, and as a function of the information content of each single frame.
4. Generation of Filter Codebooks
In this step, for each class, a number X of codevectors, hereinafter referred to as centroid codevectors CF, are computed which minimize the global distance between themselves and the codevectors FS in the class under consideration. The definition of the distance may vary depending on the class to which the codevectors FS belong. A possible applicable distance is the Euclidian distance defined for vector spaces of N dimensions. To obtain the centroid codevectors, it is possible to apply, for example, an algorithm known as k-means algorithm (see An Efficient k-Means Clustering Algorithm: Analysis and Implementation, IEEE transactions on pattern analysis and machine intelligence, vol. 24, no. 7, July 2002, p. 881-892). The extracted centroid codevectors CF forms a so-called filter codebook for the corresponding class, and the number X of centroid codevectors CF for each class is based on the coded sample representation detail. The greater the number X of centroid codevectors for each class, the greater the coded sample representation detail and the memory occupation or transmission bandwidth required.
5. Selection of the Second Data Analysis Window
In this step, based on a predefined criterion, an analysis window WS for the next step is determined as a sub-multiple of the width of the WF window determined in the previous step 2. The criterion for optimally determining the width of the analysis window depends on the desired data representation detail. The smaller the analysis window, the greater the representation detail of the coded data and the greater the memory occupation of the coded data, and vice versa. The analysis window is applied to each frame, in this way generating n subframes for each frame. The number n of subframes depends on the ratio between the widths of the windows WS and WF. A good choice for the WS window may be from one quarter to one fifth the width of the WF window.
6. Extraction of Source Parameters Using the Filter Codebooks
In this step, the transformation of each subframe into a respective source parameter vector Si is carried out through the application of a filtering transformation T2 which is, in practice, an inverse filtering function based on the previously computed filter codebook. In the case of a speech signal, the inverse filtering is applied to each subframe so as to extract from the speech signal contained in the subframe, based on the filter codebook CF, a set of source parameters modeling the excitation signal. The source parameter vectors so computed are then grouped into classes, similarly to what previously described with reference to the frames. For each class Ci, a corresponding set of source parameter vectors S is hence generated.
7. Generation of Source Codebooks
In this step, for each class C, a number Y of source parameter vectors, hereinafter referred to as source parameter centroids CSi, are computed which minimize the global distance between themselves and the source parameter vectors in the class under consideration. The definition of the distance may vary depending on the class to which the source parameter vectors S belongs. A possible applicable distance is the Euclidian distance defined for vector spaces of N dimensions. To obtain the source parameter centroids, it is possible to apply, for example, the previously mentioned k-means algorithm. The extracted source parameter centroids forms a source codebook for the corresponding class, and the number Y of source parameter centroids for each class is based on the representation detail of the coded samples. The greater the number Y of source parameter centroids for each class, the greater the representation detail and the memory occupation/transmission bandwidth. At the end of this step, a filter codebook and a source codebook are so generated for each class, wherein the filter codebooks represent the data obtained from analysis via the WF window and the associated transformation, and the source codebooks represent the data obtained from analysis via the WS window and the associated transformation (dependent on the filter codebooks.
8. Coding
The coding is carried out by applying the aforementioned CELP method, with the difference that each frame is associated with a vector of indices that specify the centroid filter parameter vectors and the centroid source parameter vectors that represent the samples contained in the frame and in the respective subframes to be coded. Selection is made by applying a pre-identified distance metric and choosing the centroid filter parameter vectors and the centroid source parameter vectors that minimize the distance between the original speech signal and the reconstructed speech signal or the distance between the original speech signal weighted with a function that models the ear perceptive curve and the reconstructed speech signal weighted with the same ear perceptive curve. The filter and source codebooks CF and CS are stored so that they can be used in the decoding phase.
9. Decoding
In this step, reconstruction of the frames is carried out by applying the inverse transformation applied during the coding phase. For each frame and for each corresponding subframe, the indices of the filter codevector and of the source codevectors belonging to filter and source codebooks CF ad CS that code for the frames and subframes is read and an approximated version of the frames is reconstructed, applying the inverse transformation.
The advantages of the present invention are evident from the foregoing description. In particular, the choice of the codevectors, the cardinality of the single codebook and the number of codebooks based on the source signal, as well as the choice of coding techniques dependent on knowledge of the informational content of the source signal allow better quality to be achieved for the reconstructed signal for the same memory occupation/transmission bandwidth by the coded signal, or a quality of reconstructed signal to be achieved that is equivalent to that of coding methods requiring greater memory occupation/transmission bandwidth.
Finally, it is clear that numerous modifications and variants can be made to the present invention, all falling within the scope of the invention, as defined in the appended claims.
In particular, it may be appreciated that the present invention may also be applied to the coding of signals other than those utilized for the generation of the filter and source codebooks CF and CS. In this respect, it is necessary to modify step 8 because the class to which the frame under consideration belongs is not known a priori. The modification therefore provides for the execution of a cycle of measurements for the best codevector using all of the N precomputed codebooks, in this way determining the class to which the frame to be coded belongs: the class to which it belongs is the one that contains the codevector with the shortest distance. In this application, an Automatic Speech Recognition (ASR) system may also be exploited to support the choice of the codebook, in the sense that the ASR is used to provide the phoneme, and then only the classes associated with that specific phoneme are considered.
Additionally, the coding bitrate has not necessarily to be the same for the whole speech signal to code, but in general different stretches of the speech signal may be coded with different bitrate. For example, stretches of the speech signal more frequently used in text-to-speech applications could be coded with a higher bitrate, i.e. using filter and/or source codebooks with higher cardinality, while stretches of the speech signal less frequently used could be coded with a lower bitrate, i.e. using filter and/or source codebooks with lower cardinality, so as to obtain a better speech reconstruction quality for those stretches of the speech signal more frequently used, so increasing the overall perceived quality.
Additionally, the present invention may also be used in particular scenarios such as remote and/or distributed Text-To-Speech (TTS) applications, and Voice over IP (VoIP) applications.
In particular, the speech is synthesized in a server, compressed using the described method, remotely transmitted, via an Internet Protocol (IP) channel (e.g. GPRS), to a mobile device such as a phone or Personal Digital Assistant (PDA), where the synthesized speech is first decompressed and then played. In particular, a speech database, in general a considerable portion of speech signal, is non-real-time pre-processed to create the codebooks, the phonetic string of the text to be synthesized is real-time generated during the synthesis process, e.g. by means of an automatic speech recognition process, the signal to be synthesized is real-time generated from the uncompressed database, then real-time coded in the server, based on the created codebooks, transmitted to the mobile device in coded form via the IP channel, and finally the coded signal is real-time decoded in the mobile device and the speech signal is finally reconstructed.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP2006/011431 | 11/29/2006 | WO | 00 | 5/28/2009 |