This invention relates to systems for, and methods of, encoding periodic components of voice signals in a voice coder for transmission to a voice decoder displaced from the voice coder. The invention also relates to a voice decoder for decoding the encoded voice signals transmitted from the voice encoder. The invention particularly relates to a voice encoder for encoding periodic components of voice signals with an enhanced resolution to provide for an optimal restoration of the voice signals at the voice decoder and also relates to a voice decoder for recovering the voice signals.
Microprocessors are used at a sending station to convert data to a digital form for transmission to a displaced position where the data in digital form is detected and converted to its original form. Although the microprocessors are small, they have enormous processing power. This has allowed sophisticated techniques to be employed by the microprocessor at the sending station to encode the data into digital form and to be employed by the microprocessor at the receiving station to decode the digital data and convert the digital data to its original form. The data transmitted may be through facsimile equipment at the transmitting and receiving stations and may be displayed as in a television set at the receiving station. As the processing power of the microprocessors has increased even as the size of the microprocessors has decreased, the sophistication in the encoding and decoding techniques, and the resultant resolution of the data at the receiving station, has become enhanced.
In recent years as the microprocessors have become progressively sophisticated in their ability to process data, it has become increasingly desirable to be able to transmit voice information in addition to data. For example, in telephone conferences, it has been desirable to transmit documents such as letters and written reports and analyses and to provide a discussion concerning such reports.
It has been found that it has been difficult to convert voice signals to a compressed digital form which can be transmitted to a receiving station to obtain a faithful reproduction of the speaker's voice at the receiving station. This results from the fact that the frequencies and amplitudes of a speaker's voice are constantly changing. This is even true during the time that the speaker is uttering a vowel, such as the letter "a", particularly since the duration of such vowels tends to be prolonged and speakers do not tend to talk in a monotone.
A considerable effort has been made, and a considerable amount of money has been expended, in recent years to provide systems for, and methods of, coding voice signals to a compressed digital form at a transmitting station, transmitting such digital signals to a receiving station and decoding such digital signals at the receiving station to reproduce the voice signals. As a result of such efforts and money expenditures, considerable progress has been made in providing a faithful reproduction of voice signals at the receiving station. However, in spite of such progress, a faithful reproduction of voice signals at the receiving station remains elusive. Listeners at the receiving station still do not hear the voice of a speaker at the transmitting station without inwardly feeling, or outwardly remarking, that there is a considerable distortion in the speaker's voice. This has tended to detract from the ability of the participants at the two (2) displaced stations to communicate meaningfull with each other.
This invention provides a system which converts voice signals into a compressed digital form in a voice coder to represent pitch frequency and pitch amplitude and the amplitudes and phases of the harmonic signals such that the voice signals can be reproduced at a voice decoder without distortion. The invention also provides a voice decoder which operates on the digital signals to provide such a faithful reproduction of the voice signals. The voice signals are coded at the voice coder in real time and are decoded at the voice decoder in real time.
In one embodiment of the invention, a new adaptive Fourier transform encoder encodes periodic components of speech signals and decodes the encoded signals. In the apparatus, the pitch frequency of voice signals in successive time frames at the voice coder may be determined as by (1) Cepstrum analysis (e.g. the time between successive peak amplitudes in each time frame, (2) harmonic gap analysis (e.g. the amplitude differences between the peaks and troughs of the peak amplitude signals of the frequency spectrum) (3) harmonic matching, (4) filtering of the frequency signals in successive pairs of time frames and the performance of steps (1), (2) and (3) on the filtered signals to provide pitch interpolation on the first frame in the pair, and (5) pitch matching.
The amplitude and phase of the pitch frequency signals and harmonic signals are determined by techniques refined relative to the prior art to provide amplitude and phase signals with enhanced resolution. Such amplitudes may be converted to a simplified digital form by (a) taking the logarithm of the frequency signals, (b) selecting the signal with the peak amplitude, (c) offsetting the amplitudes of the logarithmic signals relative to such peak amplitude, (d) companding the offset signals, (e) reducing the number of harmonics to a particular limit by eliminating alternate high frequency harmonics, (f) taking a discrete cosine transform of the remaining signals and (g) digitizing the signals in such transform. If the pitch frequency has a continuity within particular limits in successive time frames, the phase difference of the signals between successive time frames is provided.
At a displaced voice decoder, the signal amplitudes are determined by performing, in order, the inverse of steps (g) through (a). These signals and the signals representing pitch frequency and phase are processed to recover the voice signals without distortion.
In the drawings:
FIG. 1 is a simplified block diagram of a system at a voice encoder for encoding voice signals into a digital form for transmission to a voice decoder;
FIG. 2 is a simplified block diagram of a system at a voice decoder for receiving the digital signals from the voice encoder and for decoding the digital signals to reproduce the voice signals;
FIG. 3 is a block diagram in increased detail of a portion of the voice encoder shown in FIG. 1 and shows how the voice encoder determines and encodes the amplitudes and phases of the harmonics in successive time frames;
FIG. 4 is a block diagram of another portion of the voice decoder and shows how the voice encoder determines the pitch frequency of the voice signals in the successive time frames;
FIG. 5 is a block diagram of the voice decoder shown in FIG. 2 and shows the decoding system in more detail than that shown in FIG. 2;
FIG. 6 is a schematic diagram of the voice signals to be encoded in successive time frames and further illustrates how the time frames overlap;
FIG. 7 is a diagram schematically illustrating signals produced in a typical time frame to represent different frequencies after the voice signals in the time frame have been frequency transformed as by a Fourier frequency analysis;
FIG. 8 illustrates the characteristics of a low pass filter for operating upon the frequency signals such as shown in FIG. 7;
FIG. 9 is a diagram schematically illustrating a spectrum of frequency signals after the frequency signals of FIG. 7 have been passed through a low pass filter with the characteristics shown in FIG. 8;
FIG. 10 is a diagram illustrating one step involving the use of a Hamming window analysis in precisely determining the characteristics of each harmonic frequency in the voice signals in each time frame;
FIG. 11 indicates the amplitude pattern of an individual frequency as a result of using the Hamming window analysis shown in FIG. 10;
FIG. 12 illustrates the techniques used to determine the amplitude and phase of each harmonic in the voice signals in each time frame with greater precision than in the prior art;
FIG. 13 illustrates the relative amplitude values of the logarithms of the different harmonics in the voice signals in each time frame and the selection of the harmonic with the peak amplitude;
FIG. 14 indicates the logarithmic harmonic signals of FIG. 13 after the amplitudes of the different harmonics have been converted to indicate their amplitude difference relative to the peak amplitude shown in FIG. 13;
FIG. 15 schematically indicates the effect of a companding operation on the signals shown in FIG. 14; and
FIG. 16 illustrates how the frequency signals in different frequency slots or bins in each time frame are analyzed to provide voiced (binary "1") and unvoiced (binary "0") signals in such time frame.
In one embodiment of the invention, voice signals are indicated at 10 in FIG. 6. As will be seen, the voice signals are generally variable with time and generally do not have a fully repetitive pattern. The system of this invention includes a block segmentation stage 12 (FIG. 1) which separates the signals into time frames 14 (FIG. 6) each preferably having a suitable time duration such as approximately thirty two milliseconds (32 ms.). Preferably the time frames 14 overlap by a suitable period of time such as approximately twelve milliseconds (12 ms.) as indicated at 16 in FIG. 1. The overlap 16 is provided in the time frames 14 because portions of the voice signals at the beginning and end of each time frame 14 tend to become distorted during the processing of the signals in the time frame relative to the portions of the signals in the middle of the time frame.
The block segmentation stage 12 in FIG. 1 is included in a voice coder generally indicated at 18 in FIG. 1. A pitch estimation stage generally indicated at 20 estimates the pitch or fundamental frequency of the voice signals in each of the time frames 14 in a number of different ways each providing an added degree of precision and/or confidence to the estimation. The stages estimating the pitch frequency in different ways are shown in FIG. 4.
The voice signals in each time frame 14 also pass to stage 22 which provides a frequency transform such as a Fourier frequency transform on the signals. The resultant frequency signals are generally indicated at 24 in FIG. 7. The signals 24 in each time frame 14 then pass to a coder stage 26. The coder stage 26 determines the amplitude and phase of the different frequency components in the voice signals in each time frame 14 and converts these determinations to a binary form for transmission to a voice decoder such a shown in FIGS. 2 and 5. The stages for providing the determination of amplitudes and phases and for converting these determinations to a form for transmission to the voice decoder of FIG. 2 are shown in FIG. 3.
FIG. 4 illustrates in additional detail the pitch estimation stage 20 shown in FIG. 1. The pitch estimation stage 20 includes a stage 30 for receiving the voice signals on a line 32 in a first one of the time frames 14 and for performing a frequency transform on such voice signals as by a Fourier frequency transform. Similarly, a stage 34 receives the voice signals on a line 36 in the next time frame 14 and performs a frequency transform such as by a Fourier frequency transform on such voice signals. In this way, the stage 30 performs frequency transforms on the voice signals in alternate ones of the successive time frames 14 and the stage 34 performs frequency transforms on the voice signals in the other ones of the time frames. The stages 30 and 34 perform frequency transforms such as Fourier frequency transforms to produce signals at different frequencies corresponding to the signals 24 in FIG. 7.
The frequency signals from the stage 30 pass to a stage 38 which performs a logarithmic calculation on the magnitudes of these frequency signals. This causes the magnitudes of the peak amplitudes of the signals 24 to be closer to one another than if the logarithmic calculation were not provided. Harmonic gap measurements in a stage 40 are then provided on the logarithmic signals from the stage 38 The harmonic gap calculations involve a determination of the difference in amplitude between the peak of each frequency signal and the trough following the signal. This is illustrated in FIG. 7 at 42 for a peak amplitude for one of the frequency signals 24 and at 44 for a trough following the peak amplitude 40. In determining the difference between the peak amplitudes such as the amplitude 42 and the troughs such as the trough 44, the positions in the frequency spectrum around the peak amplitude and the trough are also included in the determination. The frequency signal providing the largest difference between the peak amplitude and the following trough in the frequency signals 24 constitutes one estimation of the pitch frequency of the voice signals in the time frame 14. This estimation is where the peak amplitude of such frequency signal occurs.
As will be appreciated, female voices are higher in pitch frequency than male voices. This causes the number of harmonic frequencies in the voice signals of females to be lower than those in the voice signals of male voices. However, since the pitch frequency in the voice signals of a male is low, the spacing in time between successive signals at the pitch frequency in each time frame 14 may be quite long. Because of this, only two (2) or three (3) periods at the pitch frequency may occur in each time frame 14 for a male voice. This limits the ability to provide accurate determinations of pitch frequency for a male voice.
In providing a harmonic gap calculation, the stage 40 always provides a determination with respect to the voice frequencies of voices whether the voice is that of a male or a female. However, when the voice is that of a female, the stage 40 provides an additional calculation with particular attention to the pitch frequencies normally associated with female voices. This additional calculation is advantageous because there are an increased number of signals at the pitch frequency of female voices in each time frame 14, thereby providing for an enhancement in the estimation of the pitch frequency when an additional calculation is provided in the stage 40 for female voices.
The signals from the stage 40 for performing the harmonic gap calculation pass to a stage 46 (FIG. 41) for providing a pitch match with a restored harmonic synthesis. This restored harmonic synthesis will be described in detail subsequently in connection with the description of the transform coder stage 26 which is shown in block form in FIG. 1 and in a detailed block form in FIG. 3. The stage 46 operates to shift the determination of the pitch frequency from the stage 66 through a relatively small range above and below the determined pitch frequency to provide a optimal matching with such harmonic synthesis. In this way, the determination of the pitch frequency in each time frame is refined if there is still any ambiguity in this determination. As will be appreciated, a sequence of 512 successive frequencies can be represented in a binary sequence of nine (9) binary bits. Furthermore, the pitch frequency of male and female voices generally falls in this binary range of 512 discrete frequencies. As will be seen subsequently, the pitch frequency of the voice signals in each time frame 14 is indicated by nine (9) binary bits.
The signals from the stage 46 are introduced to a stage 48 for determining a harmonic difference. In the stage 48, the peak amplitudes of all of the odd harmonics are added to provide one cumulative value and the peak amplitudes of all of the even harmonics are added to provide another cumulative value. The two cumulative values are then compared. When the cumulative value for the even harmonics exceeds the cumulative value for the odd harmonics by a particular value such as approximately fifteen per cent (15%), the lowest one of the even harmonics is selected as the pitch frequency. Otherwise, the lowest one of the odd harmonics is selected.
The voice signals on the lines 32 (for the alternate time frames 14) and 36 (for the remaining time frames 14) are introduced to a low pass filter 52. The filter 52 has characteristics for passing the full amplitudes of the signal components in the pairs of successive time frames with frequencies less than approximately one thousand hertz (1000 Hz). This is illustrated at 54a in FIG. 8. As the frequency components increase above one thousand hertz (1000 Hz), progressive portions of these frequency components are filtered. This is illustrated at 54b in FIG. 8. As will be seen in FIG. 8, the filter has a flat response 54a to approximately one thousand hertz (1000 Hz) and the response then decreases relatively rapidly between a range of frequencies such as to approximately eighteen hundred hertz (1800 Hz). The lowpass filtered signal is subsampled by a factor of two--i.e., alternate samples are discarded. This is consistent with the theory since the frequencies above 2000 Hz have been nearly diminished.
The signals passing through the low pass filter 52 in FIG. 4 are introduced to a stage 56 for providing a frequency transform such as a Fourier frequency transform. By filtering increasing amplitudes of the signals with progressive increases in frequency above one thousand Hertz (1000 Hz), the frequency transformed signals generally indicated at 58 in FIG. 9 are spread out more in the frequency spectrum than the signals in FIG. 7. This may be seen by comparing the frequency spectrum of the signals produced in FIG. 9 as a result of the filtering in comparison with the frequency spectrum in FIG. 7. The spreading of the frequency spectrum in FIG. 9 causes the resolution in the signals to be enhanced. For example, the frequency resolution may be increased by a factor of two (2).
The signals from the low pass filter 52 are also introduced to a stage 60 for providing a Cepstrum computation or analysis. Stages providing Cepstrum computations or analyses are well known in the art. In such a stage, the highest peak amplitude of the filtered signals in each pair of successive time frames 14 is determined. This signal may be indicated at 62 in FIG. 6. The time between this signal 62 and a signal 64 with the next highest peak amplitude in the pair of successive time frames 14 may then be determined. This time is indicated at 66 in FIG. 6. The time 66 is then translated into a pitch frequency for the signals in the pair of successive time frames 14.
The determination of the pitch frequency in the stage 60 is introduced to a stage 66 in FIG. 4. The stage 66 receives the signals from a stage 68 which performs logarithmic calculations on the amplitudes of the frequency signals from the stage 56 in a manner similar to that described above for the stage 38. The stage 66 provides harmonic gap calculations of the pitch frequency in a manner similar to that described above for the stage 40. The stage 66 accordingly modifies (or provides a refinement in) the determination of the frequency from the stage 60 if there is any ambiguity in such determination. Alternatively, the stage 60 may be considered to modify (or provide a refinement in) the signals from the stage 66. As will be appreciated, there may be an ambiguity in the determination of the pitch frequency from the stage 60 if the time determination should be made from a different peak amplitude than the highest peak amplitude in the two (2) successive time frames or if the time between the successive peaks does not provide a precise indication of the pitch frequency.
As previously described, the stage 34 provides a frequency transform such as a Fourier frequency transform on the signals in the line 36 which receives the voice signals in the second of the two (2) successive time frames 14 in each pair. The frequency signals from the stage 34 pass to a stage 70 which provides a log magnitude computation or analysis corresponding to the log magnitude computations or analyses provided by the stages 38 and 68. The signals from the stage 70 in turn pass to the stage 66 to provide a further refinement in the determination of the pitch frequency for the voice signals in each pair of two (2) successive time frames 14.
The signals from the stage 66 pass to a stage 74 which provides a pitch match with a restored harmonic synthesis. This restored harmonic synthesis will be described in detail subsequently in connection with the description of the transform coder stage 26 which is shown in block form in FIG. 1 and in a detailed block form in FIG. 3. The pitch match performed by the stage 74 corresponds to the pitch match performed by the stage 46. The stage 74 operates to shift the determination of the pitch frequency from the stage 66 through a relatively small range above and below this determined pitch frequency to provide an optimal matching with such harmonic synthesis. In this way, the determination of the pitch frequency in each time frame is refined if there is still any ambiguity in this determination.
A stage 78 receives the refined determination of the pitch frequency from the stage 74. The stage 78 provides a further refinement in the determination of the pitch frequency in each time frame if there is still any ambiguity in such determination. The stage 78 operates to accumulate the sum of the amplitudes of all of the odd harmonics in the frequency transform signals obtained by the stage 74 and to accumulate the sum of the amplitudes of all of the even harmonics in such frequency transform. If the accumulated sum of all of the even harmonics exceeds the accumulated sum of all of the odd harmonics by a particular magnitude such as fifteen percent (15%) of the accumulated sum of the odd harmonics, the lowest frequency in the even harmonics is chosen as the pitch frequency. If the accumulated sum of the even harmonics does not exceed the accumulated sum of the odd harmonics by this threshold, the lowest frequency in the odd harmonics is selected as the pitch frequency. The operation of the harmonic difference stage 78 corresponds to the operation of the harmonic difference stage 48.
The signals from the stage 78 pass to a pitch interpolation stage 80. The pitch interpolation stage 80 also receives through a line 82 signals which represent the signals obtained from the stage 78 for one (1) previous frame. For example, if the signals passing to the stage 80 from the stage 78 represent the pitch frequency determined in time frames 1 and 2, the signals on the line 82 represent the pitch frequency determined for the frame 0. The stage 80 interpolates between the pitch frequency determined for the time frame 0 and the time frames 1 and 2 and produces information representing the pitch frequency for the time frame 1. This information is introduced to the stage 40 to refine the determination of the pitch frequency in that stage for the time frame 1.
The pitch interpolation stage 80 also employs heuristic techniques to refine the determination of pitch frequency for the time frame 1. For example, the stage 80 may determine the magnitude of the power in the frequency signals for low frequencies in the time frames 1 and 2 and the time frame 0. The stage 80 may also determine the ratio of the cumulative magnitude of the power in the frequency signals at low frequencies (or the cumulative magnitude of the amplitudes of such signals) in such time frames relative to the cumulative magnitude of the power (or the cumulative magnitude of the amplitudes) of the high frequency signals in such time frames. These factors, as well as other factors, may be used in the stage 80 in refining the pitch frequency for the time frame 1.
The output from the pitch interpolation stage 80 is introduced to the harmonic gap computation stage 40 to refine the determination of the pitch frequency in the stage 38. As previously described, this determination is further refined by the pitch match stage 46 and the harmonic difference stage 48. The output from the harmonic difference stage 48 indicates in nine (9) binary bits the refined determination of the pitch frequency for the time frame 1. These are the first binary bits that are transmitted to the voice decoder shown in FIG. 2 to indicate to the voice decoder the parameters identifying the characteristics of the voice signals in the time frame 1. In like manner, the harmonic difference stage 78 indicates in nine (9) binary bits the refined estimate of the pitch frequency for the time frame 2. These are the first binary bits that are transmitted to the voice decoder shown in FIG. 2 to indicate the parameters of the voice signals in the time frame 2. As will be appreciated, the system shown in FIG. 4 and described above operates in a similar manner to determine and code the pitch frequency in successive pairs of time frames such as time frames 3 and 4, 5 and 6, etc.
The transform coder 26 in FIG. 1 is shown in detail in FIG. 3. The transform coder 26 includes a stage 86 for determining the amplitude and phase of the signals at the fundamental (or pitch) frequency and the amplitude and phase of each of the harmonic signals. This determination is provided in a range of frequencies to approximately four KiloHertz (4 KHz) bandwidth. The determination is limited to approximately four thousand hertz (4 KHz) because the limit of four thousand hertz (4 Kz) corresponds to the limit of frequencies encountered in the telephone network as a result of adapted standards.
As first step in determining the amplitude and a phase of the pitch frequency and the harmonics in each time frame 14, the stage 86 divides the frequency range to four thousand Hertz (4000 Hz) into a number of frequency blocks such as thirty two (32). The stage 86 then divides each frequency block into a particular number of grids such as approximately sixteen (16). Several frequency blocks 96 and the grids 98 for one of the frequency blocks are shown in FIG. 12. The stage 86 knows, from the determination of the pitch frequency in each time frame 14, the frequency block in which each harmonic frequency is located. The stage 86 then determines the particular one of the sixteen (16) grids in which each harmonic is located in its respective frequency block. By precisely determining the frequency of each harmonic signal, the amplitude and phase of each harmonic signal can be determined with some precision, as will be described in detail subsequently.
As a first step in determining with some precision the frequency of each harmonic signal in the Fourier frequency transform produced in each time frame 14, the stage 86 provides a Hamming window analysis of the voice signals in such time frame 14. A Hamming window analysis is well known in the art. In a Hamming window analysis, the voice signals 92 (FIG. 10) in each time frame 14 are modified as by a curve having a dome-shaped pattern 94 in FIG. 10. As will be seen, the dome-shaped pattern 94 has a higher amplitude with progressive positions toward the center of the time frame 14 then toward the edges of the time frame. This relative de-emphasis of the voice signals at the opposite edges of each time frame 14 is one reason why the time frames are overlapped as shown in FIG. 6.
When the Hamming pattern 94 is used to modify the voice signals in each time frame 14 and a Fourier transform is made of the resultant pattern for an individual frequency, a frequency pattern such as shown in FIG. 11 is produced. This frequency pattern may be produced for one of the sixteen (16) grids in the frequency block in which a harmonic is determined to exist. Similar frequency patterns are determined for the other fifteen (15) grids in the frequency block. The grid which is nearest to the location of a given harmonic is selected. By determining the particular one of the sixteen (16) grids in which the harmonic is located, the frequency of the harmonic is selected with greater precision than in the prior art.
In this way, the amplitude and phase are determined for each harmonic in each time frame 14. The phase of each harmonic is encoded for each time frame 14 by comparing the harmonic frequency in each time frame 14 with the harmonic frequency in the adjacent time frames. As will be be appreciated, changes in the phase of a harmonic signal result from changes in frequency of that harmonic signal. Since the period in each time frame 1 is relatively short and since there is a time overlap between adjacent time frames, any changes in pitch frequency in successive time frames may be considered to result in changes in phase.
As a result of the analysis as discussed above, pairs of signals are generated for each harmonic frequency, one of these signals representing amplitude and the other representing phase. These signals may be represented as a.sub.1 .phi..sub.1, a.sub.2 .phi..sub.2, a.sub.3 .phi..sub.3, etc.
In this sequence
a.sub.1, a.sub.2, a.sub.3, etc. represent the amplitudes of the signals at the fundamental frequency and the second, third, etc. harmonics of the pitch frequency signals in each time frame; and
.phi..sub.1, .phi..sub.2, .phi..sub.3, etc. represent the phases of the signals at the fundamental frequency and the second, third, etc. harmonics in each time frame 14.
Although the amplitude values a.sub.1, a.sub.2, a.sub.3, etc., and the phase values .phi..sub.1, .phi..sub.2, .phi..sub.3, etc. may represent the parameters of the signals at the fundamental pitch frequency and the different harmonics in each time frame 14 with some precision, these values are not in a form which can be transmitted from the voice coder 18 shown in FIG. 1 to a voice decoder generally indicated at 100 in FIG. 2. The circuitry shown in FIG. 3 provides a conversion of the amplitude values a.sub.1, a.sub.2, a.sub.3, etc., and the phase values .phi..sub.1, .phi..sub.2, .phi..sub.3, etc. to a meaningful binary form for transmission to the voice decoder 100 in FIG. 2 and for decoding at the voice decoder.
To provide such a conversion, the signals from the harmonic analysis stage 86 in FIG. 3 are introduced to a stage 104 designated as "spectrum shape calculation". The stage 104 also receives the signals from a stage 102 which is designated as "get band amplitude". The input to the stage 102 corresponds to the input to the stage 86. The stage 102 determines the frequency band in which the amplitude of the signals occurs.
As a first step in converting the amplitudes a.sub.1, a.sub.2, a.sub.3, etc., to meaningful and simplified binary values for transmission to the voice decoder 100, the logarithms of the amplitude values a.sub.1, a.sub.2, a.sub.3, etc., are determined in the stage 104 in FIG. 3. Taking the logarithm of these amplitude values is desirable because the resultant values become compressed relative to one another without losing their significance with respect to one another. The logarithms can be with respect to any suitable base value such as a base value of two (2) or a base value of ten (10).
The logarithmic values of amplitude are then compared in the stage 104 in FIG. 3 to select the peak value of all of these amplitudes. This is indicated schematically in FIG. 13 where the different frequency signals and the amplitudes of these signals are indicated schematically and the peak amplitude of the signal with the largest amplitude is indicated at 106. The amplitudes of all of the other frequency signals are then scaled with the peak amplitude 106 as a base. In other words, the difference between the peak amplitude 106 and the magnitude of each of the remaining amplitude values a.sub.1, a.sub.2, a.sub.3, etc., is determined. These difference values are indicated schematically at 108 in FIG. 14.
The difference values 108 in FIG. 14 are next companded. A companding operation is well known in the art. In a companding operation, the difference values shown in FIG. 14 are progressively compressed for values at the high end of the amplitude range. This is indicated schematically at 110 in FIG. 15. In effect, the amplitude values closest to the peak values in FIG. 13 are emphasized by the companding operation relative to the amplitudes of low value in FIG. 13.
As the next step in converting the amplitude values a.sub.1, a.sub.2, a.sub.3, etc., to a meaningful and simplified binary form, the number of such values is limited in the stage 104 to a particular value such as forty five (45) if the amplitude values exceed forty five (45). This limit is imposed by disregarding the harmonics having the highest frequency values. Disregarding the harmonics of the highest frequency does not result in any deterioration in the faithful reproduction of sound since most of the information relating to the sound is contained in the low frequencies.
As a next step, the number of harmonics is limited in the stage 104 to a suitable number such as sixteen (16) if the number of harmonics is between sixteen (16) and twenty (20). This is accomplished by eliminating alternate ones of the harmonics at the high end of the frequency range if the number of harmonics is between sixteen (16) and twenty (20). If the number of harmonics is less than sixteen (16), the harmonics are expanded to sixteen (16) by pairing successive harmonics at the upper frequency end to form additional harmonics between the paired harmonics and by interpolating the amplitudes of the additional harmonics in accordance with the amplitudes of the paired harmonics.
In like manner, if the number of harmonics is greater than twenty four (24), alternate ones of the harmonics are eliminated at the high end of the frequency range until the number of harmonics is reduced to twenty four (24). If the number of harmonics is between twenty one (21) and twenty four (24), the number of harmonics is increased to twenty four (24) by pairing successive harmonics at the upper frequency end to form additional harmonics between the paired harmonics and by interpolating the amplitudes of the additional harmonics in accordance with the amplitudes of the paired harmonics.
After the number of harmonics has been limited to sixteen (16) or twenty four (24) depending upon the number of harmonics produced in the Fourier frequency transform, a discrete cosine transform is provided in the stage 104 on the limited number of harmonics. The discrete cosine transform is well known to be advantageous for compression of correlated signals such as in a spectrum shape. The discrete cosine transform is taken over the full range of sixteen (16) or twenty four (24) harmonics. This is different from the prior art because the prior art obtains several discrete cosine transforms of the harmonics, each limited to approximately eight (8) harmonics. However, the prior art does not limit the total number of frequencies in the transform such as is provided in the system of this invention when the number is limited to sixteen (16) or twenty four (24).
The results obtained from the discrete cosine transform discussed in the previous paragraph are subsequently converted by a stage 110 to a particular number of binary bits to represent such results. For example, the results may be converted to forty eight (48), sixty four (64) or eighty (80) binary bits. The number of binary bits is preselected so that the voice decoder 100 will know how to decode such binary bits. In coding the results of the discrete cosine transform, a greater emphasis is preferably placed on the low frequency components of the discrete cosine transform relative to the high frequency components. For example, the number of binary bits used to indicate the successive values from the discrete cosine transform may illustratively be a sequence 5, 5, 4, 4, 3, 3, 3 . . . 2, 2 . . . , , 0, 0, 0. In this sequence, each successive number from the left represents a component of progressively increasing frequency. The 48, 64 or 80 binary bits representing the results of the discrete cosine transform are transmitted to the voice decoder 100 in FIG. 2 after the transmission of the nine (9) binary bits representing the pitch or fundamental frequency.
A stage 112 in FIG. 3 receives the signals representing the discrete cosine transform from the stage 104 and reconstructs these signals to a form corresponding to the Fourier frequency transform signals introduced to the stage 86. As a first step in this reconstruction, the stage 112 receives the signals from the stage 104 and provides an inverse of a discrete cosine transform. The stage 112 then expands the number of harmonics to coincide with the number of harmonics in the Fourier frequency transform signals introduced to the stage 86. The stage 112 does this by interpolating between the amplitudes of successive pairs of harmonics in the upper end of the frequency range. The stage 112 then performs a decompanding operation which is the inverse of the companding operation performed by the stage 110. The signals are now in a form corresponding to that shown in FIG. 14.
To convert the signals to the form shown in FIG. 13, a difference is determined between the peak amplitude 106 shown in FIG. 13 for each harmonic and the amplitude shown in FIG. 14 for such harmonic. The resultant amplitudes correspond to those shown in FIG. 13, assuming that each step in the reconversion provided in the stage 112 provides ideal calculations. The signals corresponding to those shown in FIG. 13 are then processed in the stage 112 to remove the logarithmic values and to obtain Fourier frequency transform signals corresponding to those introduced to the stage 86.
The reconstructed Fourier frequency transform signals from the stage 112 are introduced to a stage 116. The Fourier frequency transform signals passing to the stage 86 are also introduced to the stage 116 for comparison with the reconstructed Fourier frequency transform signals in the stage 112. To provide this comparison, the Fourier frequency transform signals from each of the stages 86 and 112 are considered to be disposed in twelve (12) frequency slots or bins 118 as shown in FIG. 16. Each of the frequency slots or bins 118 has a different range of frequencies than the other frequency slots or bins. The number of frequency slots or bins is arbitrary but twelve (12) may be preferable. It will be appreciated that more than one (1) harmonic may be located in each time slot or bin 118.
The stage 116 compares the amplitudes of the Fourier frequency transform signals from the stage 112 in each frequency slot or bin 118 and the signals introduced to the stage 86 for that frequency slot or bin. If the amplitude match is within a particular factor for an individual one of the time slot or bin 118, the stage 116 produces a binary "1" for that time slot or bin. If the amplitude match is not within the particular factor for an individual time slot or bin 118, the stage 116 produces a binary "0" for that time slot or bin. The particular factor may depend upon the pitch frequency and upon other quality factors.
FIG. 16 illustrates when a binary "1" is produced in a time slot or bin 118 and when a binary "0" is produced in a time slot or bin 118. As will be seen, when the correlation between the signals in the stages 86 and 112 is high as indicated by a signal of large amplitude, a binary "1" is produced in a time slot or bin 118. However, when the correlation is low as indicated by a signal of low amplitude, a binary "0" is produced for a time slot or bin 118. In effect, the stage 116 provides a binary "1" only in the frequency slots or bins 118 where the stage 104 has been successful in converting the frequency indications in the stage 86 to a form closely representing the indications in the stage 86. In the time slots or bins 118 where such conversion has not been successful, the stage 116 provides a binary "0".
Some post processing may be provided in the stage 116 to reconsider whether the binary value for a time slot or bin 118 is a binary "1" or a binary "0". For example, if the binary values for successive time slots or bins is "000100", the binary value of "1" in this sequence in the time frame 114 under consideration may be reconsidered in the stage 116 on the basis of heuristics. Under such circumstances, the binary value for this time slot or bin in the adjacent time frames 14 could also be analyzed to reconsider whether the binary value for this time slot or bin in the time frame 14 under consideration should actually be a binary "0" rather than a binary "1". Similar heuristic techniques may also be employed in the stage 116 to reconsider whether the binary value of "0" in the sequence of 11101 should be a binary "1" rather than a binary "0".
The twelve (12) binary bits representing a binary "1" or a binary "0" in each of the twelve (12) time slots or bins (118) in each time frame 14 are introduced to the stage 110 in FIG. 3 for transmission to the voice decoder 100 shown in FIG. 1. These twelve (12) binary bits in each time frame may be produced immediately after the nine (9) binary bits representing the pitch frequency and may be followed by the 48, 64 or 80 binary bits representing the amplitudes of the different harmonics. A binary "1" in any of these twelve (12) time bins or slots 118 may be considered to represent voiced signals for such time bin or slot. A binary "0" in any of these twelve (12) time bins or slots 118 may be considered to represent unvoiced signals for such time bin or slot. For a time bin or slot where unvoiced signals are produced, the amplitude of the harmonic or harmonics in such time bin or slot may be considered to represent noise at an average of the amplitude levels of the harmonic or harmonics in such time slot or bin.
The binary value representing the voiced (binary "1") or unvoiced (binary "0") signals from the stage 116 are introduced to the stage 104. For the time slots or bins 118 where a binary "1" has been produced by the stage 116, the stage 104 produces binary signals representing the amplitudes of the signals in the time slots or bins. These signals are encoded by the stage 110 and are transmitted through a line 124 to the voice decoder shown in FIG. 2. When a binary "0" is produced by the stage 116 for a time slot or bin 118, the stage 104 produces "noise" signals having an amplitude representing the average amplitude of the signals in the time slot or bin. These signals are encoded by the stage 110 into binary form and are transmitted through the line 124 to the voice decoder.
The phase signals .phi..sub.1, .phi..sub.2, .phi..sub.3, etc. for the successive harmonics in each time frame 14 are converted in a stage 120 in FIG. 3 to a form for transmission to the voice decoder 100. If the phase of the signals for a harmonic has at least a particular continuity in a particular time frame 14 with the phase of the signals for the harmonic in the previous time frame, the phase of the signal for the harmonic in the particular time frame is predicted from the phase of the signal for the harmonic in the previous time frame. The difference between the actual phase and this prediction is what is transmitted for the phase of the signal for the harmonic in the particular time frame. For a particular number of binary bits to represent such harmonic, this difference prediction can be transmitted with more accuracy to the voice decoder 100 than the information representing the phase of the signal constituting such harmonic in such particular time frame. However, if the phase of the signal for such harmonic in such particular time frame 14 does not have at least the particular continuity with the phase of the signal for such harmonic in the previous time frame, the phase of the signal for such harmonic in such particular time frame is transmitted to the voice decoder 100.
As with the amplitude information, a particular number of binary bits is provided to represent the phase, or the difference prediction of the phase, for each harmonic in each time frame. The number of binary bits representing the phases, or the difference predictions of the phases, of the harmonic signals in each time frame 14 is computed as the total bits available for the time frame minus the bits already used for prior information. The phases, or the difference predictions of the phases, of the signals at the lower harmonic frequencies are indicated in a larger number of binary bits than the phases of the signals, or the difference predictions of the phases, of the signals at the higher frequencies.
The binary bits representing the phases, or the predictions of the phases, for the signals of the different harmonics in each time frame 14 are produced in a stage 130 in FIG. 3, this stage being designated as "phase encoding". The binary bits representing the phases, or the prediction of the phases, of the signals at the different harmonics in each time frame 14 are transmitted through a line 132 in each time frame 14 after the binary bits representing the amplitudes of the signals at the different harmonics in each time frame.
The voice decoder 100 is shown in a simplified block form in FIG. 2. The voice decoder 100 includes a line 140 which receives the coded voice signals from the voice coder 18. A transform decoder stage generally indicated at 142 operates upon these signals, which indicate the pitch frequency and the amplitudes and phases of the pitch frequency and the harmonics, to recover the signals representing the pitch frequency and the harmonics. A stage 144 performs an inverse of a Fourier frequency transform on the recovered signals representing the pitch frequency and the harmonics to restore the signals to a time domain form. These signals are further processed in the stage 144 by compensating for the effects of the Hamming window 94 shown in FIG. 10. In effect, the stage 144 divides by the Hamming window 94 to compensate for the multiplication by the Hamming window in the voice coder 18. The signals in the time domain form are then separated in a stage 146 into the voice signals in the successive time frames 14 by taking account of the time overlap still remaining in the signals from the stage 144. This time overlap is indicated at 1 in FIG. 6.
The transform decoder stage 142 is shown in block form in additional detail in FIG. 5. The transform decoder 142 includes a stage 150 for receiving the 48, 64 or 80 bits representing the amplitudes of the pitch frequency and the harmonics and for decoding these signals to determine the amplitudes of the pitch frequency and the harmonics. In decoding such signals, the stage 150 performs a sequence of steps which are in reverse order to the steps performed during the encoding operation and which are the inverse of such steps. As a first step in such decoding, the stage 150 performs the inverse of a discrete cosine transform on such signals to obtain the frequency components of the voice signals in each time frame 14.
As will be appreciated, the number of signals produced as a result of the inverse discrete cosine transform depends upon the number of the harmonics in the voice signals at the voice coder 18 in FIG. 1. The number of harmonics is then expanded or compressed to the number of harmonics at the voice coder 18 by interpolating between successive pairs of harmonics at the upper end of the frequency range. The number of harmonics in the voice signals at the voice coder 18 in each time frame can be determined in the stage 18 from the pitch frequency of the voice signals in that time frame. As will be appreciated, if an expansion in the number of harmonics occurs, the amplitude of each of these interpolated signals may be determined by averaging the amplitudes of the harmonic signals with frequencies immediately above and below the frequency of this interpolated signal.
A decompanding operation is then performed on the expanded number of harmonic signals. This decompanding operation is the inverse of the companding operation performed in the transform coder stage 26 shown in FIG. 1 and in detail in FIG. 3 and shown schematically in FIG. 15. The decompanded signals are then restored to a base of zero (0) as a reference from the peak amplitude of all of the harmonic signals as a reference. This corresponds to a conversion of the signals from the form shown in FIG. 14 to the form shown in FIG. 13.
A phase decoding stage 152 (FIG. 3) in FIG. 5 receives the signals from the amplitude decoding stage 150. The phase decoding stage 152 determines the phases .phi..sub.1, .phi..sub.2, .phi..sub.3, etc. for the successive harmonics in each time frame 14. The phase decoding stage 152 does this by decoding the binary bits indicating the phase of each harmonic in each time frame 14 or by decoding the binary bits indicating the difference predictions of the phase for such harmonic in such time frame 14. When the phase decoding stage 152 decodes the difference prediction of the phase of a harmonic in a particular time frame 14, it does so by determining the phase for such harmonic in the previous time frame 14 and by modifying such phase in the particular time frame 14 in accordance with such phase prediction for such time frame.
The decoded phase signals from the phase decoding stage 152 ar introduced to a harmonic reconstruction stage 154 as are the signals from the amplitude decoding stage 150. The harmonic reconstruction stage 154 operates on the amplitude signals from the amplitude decoding stage 150 and the phase signals from the phase decoding stage 154 for each time frame 14 to reconstruct the harmonic signals in such time frame. The harmonic reconstruction stage 152 reconstructs the harmonics in each time frame 152 by providing the frequency pattern (FIG. 11) at different frequencies to determine the pattern at such different frequencies of the signals introduced to the stage 154.
The signals from the harmonic reconstruction stage 154 are introduced to a harmonic synthesis stage 158. The stage 158 operates to synthesize the Fourier frequency coefficients by positioning the harmonics and multiplying these harmonics by the Fourier frequency transform of the Hamming window 94 shown in FIG. 10. The signals from the harmonic synthesis stage 158 pass to a stage 160 where the unvoiced signals (binary "0") in the time slots or bins 118 (FIG. 16) are provided on a line 167 and are processed. In these frequency bins or slots 118, signals having a noise level represented by the average amplitude level of the harmonic signals in such time slots or bins are provided on the line 168. These signals are processed in the stage 160 to recover the frequency components in such time slots. As previously indicated, the signals from the stage 160 are subjected in the stage 144 in FIG. 2 to the inverse of the Fourier frequency transform. The resultant signals are in the time domain and are modified by the inverse of the Hamming window 94 shown in FIG. 10. The signals from the stage 144 accordingly represent the voice signals in the successive time frames 14. The overlap in the successive time frames 14 is removed in the stage 146 to reproduce the voice signals in a continuous pattern.
The apparatus and methods described above have certain important advantages. They employ a plurality of different techniques to determine, and then refine the determination of, the pitch frequency in each of a sequence of overlapping time frames. They employ refined techniques to determine the amplitude and phase of the pitch frequency signals and the harmonic signals in the voice signals of each time frame. They also employ refined techniques to convert the amplitude and phase of the pitch frequency signals and the harmonic signals to a binary form which accurately represents the amplitudes and phases of such signals.
The apparatus and methods described in the previous paragraph are employed at the voice coder. The voice decoder employs refined techniques which are the inverse of those, and are in reverse order to those, at the voice coder to reproduce the voice signals. The apparatus and methods employed at the voice decoder are refined in order to process, in reverse order and on an inverted basis, the encoded signals to recover the voice signals introduced to the voice encoder.
Although this invention has been disclosed and illustrated with reference to particular embodiments, the principles involved are susceptible for use in numerous other embodiments which will be apparent to persons skilled in the art. The invention is, therefore, to be limited only as indicated by the scope of the appended claims.