This application claims the benefit of Korean Patent Application No. 10-2004-0081343, filed on Oct. 12, 2004, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.
1. Field of the Invention
The present invention relates to a method and apparatus for estimating the fundamental frequency, that is, the pitch, of a speech signal, and more particularly to a method and an apparatus by which mixture Gaussian distributions are generated based on candidate pitches having high period estimating values, a mixture Gaussian distribution having a high likelihood is selected and dynamic programming is executed so that the pitch of the speech signal can be accurately estimated.
2. Description of Related Art
Recently, various applications for recognizing, synthesizing and compressing a speech signal have been developed. In order to accurately recognize, synthesize and compress a speech signal, it is very important to estimate the fundamental frequency, that is, the pitch, of the speech signal, and, accordingly, many studies on a method for accurately estimating the pitch have been conducted. General methods for extracting the pitch include a method for extracting the pitch from a time domain, a method for extracting the pitch from a frequency domain, a method for extracting the pitch from an autocorrelation function domain and a method for extracting the pitch from the property of a waveform.
U.S. Pat. No. 6,012,023 discloses a method for extracting voiced sound and voiceless sound of a speech signal to accurately detect the pitch of the speech signal which has an autocorrelation value with a halving or doubling pitch that is higher than the pitch to be extracted.
U.S. Pat. No. 6,035,271 discloses a method for selecting candidate pitches from a normalized autocorrelation function, determining the points of anchor pitches based on the selected candidate pitches, and forwardly and backwardly performing a search from the points of the anchor pitches to extract the pitch.
However, these conventional pitch extracting methods are affected by a Formant frequency, and thus, the pitch cannot be accurately estimated.
An aspect of the present invention provides a method for accurately estimating the pitch of a speech signal.
Another aspect of the present invention also provides an apparatus for accurately estimating the pitch of a speech signal.
According to an aspect of the present invention, there is provided a pitch estimating method including computing a normalized autocorrelation function of a windowed signal obtained by multiplying a frame of a speech signal by a window signal and determining candidate pitches from a peak value of the normalized autocorrelation function of the windowed signal, interpolating a period of the determined candidate pitches and a period estimating value representing a length of the period, generating Gaussian distributions for the candidate pitches for each frame for which the interpolated period estimating value is greater than a first threshold value, mixing the Gaussian distributions which are located at a distance less than a second threshold value to generate mixture Gaussian distributions and selecting at least one of the mixture Gaussian distributions that has a likelihood exceeding a third threshold value, and executing dynamic programming for the frames to estimate the pitch of each frame based on the candidate pitches of each of the frames and the selected mixture Gaussian distributions.
The method may further include determining whether the candidate pitch exists in a sub-harmonic frequency range of the average frequency generated based on the average frequency and the variance of the selected mixture Gaussian distributions and reproducing an additional candidate pitch from the candidate pitches in the sub-harmonic frequency range having the largest period estimating value.
The method may further include repeating the mixing the Gaussian distributions and selecting at least one of the mixture Gaussian distributions, the executing dynamic programming and the determining whether the candidate pitch exists in the sub-harmonic frequency range and reproducing the additional candidate pitch until the sum of the local distances up the final frame is not increased during the dynamic programming and no additional candidate pitches are generated.
According to another aspect of the present invention, there is provided a pitch estimating apparatus including a first candidate pitch determining unit computing a normalized autocorrelation function of a windowed signal obtained by multiplying a frame of a speech signal by a window signal and determining candidate pitches from a peak value of the normalized autocorrelation function of the windowed signal, an interpolating unit interpolating a period of the determined candidate pitches and a period estimating value representing a length of the period, a Gaussian distribution generating unit generating Gaussian distributions for the candidate pitches for each frame for which the interpolated period estimating value is greater than a first threshold value, a mixture Gaussian distribution generating unit mixing the Gaussian distributions that have a distance smaller than a second threshold value to generate mixture Gaussian distributions, a mixture Gaussian distribution selecting unit selecting at least one of the mixture Gaussian distributions that has a likelihood exceeding a third threshold value, and a dynamic programming executing unit executing dynamic programming for the frames based on the candidate pitches of each frame and the selected mixture Gaussian distributions to estimate the pitch of each frame.
The apparatus may further include an additional candidate pitch reproducing unit determining whether the candidate pitch exists in a sub-harmonic frequency range of the average frequency generated based on the average frequency and the variance of the selected mixture Gaussian distributions and reproducing an additional candidate pitch from the candidate pitches in the sub-harmonic frequency range having the largest period estimating value.
The apparatus may further include a tracking determining unit continuously repeating the pitch tracking of the speech signal based on the output values of the dynamic programming executing unit and the additional candidate pitch reproducing unit.
According to another aspect of the present invention, there is provided computer-readable storage media encoded with processing instructions for causing a processor to perform the aforementioned method.
Additional and/or other aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Additional and/or other aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention:
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below in order to explain the present invention by referring to the figures.
Referring to
The autocorrelation function (Rw(τ)) of the window signal is normalized to generate the normalized autocorrelation function of the window signal (operation 220). Preferably, the hamming function is used as the window signal and the normalized autocorrelation function of the hamming function is computed using equation (1).
In addition, the autocorrelation function of the windowed signal generated in operation 210 is normalized to generate the normalized autocorrelation function of the windowed signal (operation 230). The normalized autocorrelation function (Rs(τ)) of the windowed signal is a symmetric function and is given by equation (2).
The normalized autocorrelation function of the windowed signal is divided by the normalized autocorrelation function of the window signal to generate a normalized autocorrelation function (Ro(τ)) of the windowed signal in which the windowing effect is reduced (as shown in Equation (3) (operation 240)).
Generally, an autocorrelation function is generated by multiplying an original signal with the signal obtained by delaying the original signal by a predetermined amount. However, in the present embodiment, the autocorrelation function is computed using equation (4).
Power spectrum signal=FFT(autocorrelation function), Autocorrelation function=IFFT(power spectrum signal) (4)
Accordingly, the autocorrelation function can be computed by the Inverse Fast Fourier Transforming (IFFF) the power spectrum signal. Since a Fast Fourier Transform and an Inverse Fast Fourier Transform are different from each other only by a scaling factor and only the peak value of the autocorrelation function is required in the present invention, the Fast Fourier Transform can be used instead of the Inverse Fast Fourier Transform. The autocorrelation function of the window signal is divided by a first normalization coefficient to generate the normalized autocorrelation function of the window signal (operation 350).
Referring back to
The period of the determined candidate pitches and the period estimating value (pr) representing the length of the period are interpolated (operation 130). The pitch is derived from the candidate pitch period, which is estimated from the peak value of the normalized autocorrelation function of the windowed signal. The candidate pitch is determined by dividing the sampling frequency by the delay, which is an integer, of the normalized autocorrelation function of the windowed signal. However, the actual period of the candidate pitch may not be an integer, and, accordingly, the period of the candidate pitch and the period estimating value of the period must be interpolated in order to more accurately obtain the period of the candidate pitch and period estimating value of the period.
Based on the period estimating value of the interpolated period, the candidate pitches having an interpolated period estimating value greater than a first threshold value TH1 are selected (hereinafter, candidate pitches having an interpolated period estimating value greater than the first threshold value TH1 are referred to as anchor pitches) and Gaussian distributions of the anchor pitches are generated (operation 140). Among the generated Gaussian distributions, the Gaussian distributions which are located within a distance smaller than a second threshold value TH2 are mixed to generate mixture Gaussian distributions and at least one mixture Gaussian distribution having a likelihood exceeding a third threshold value TH3 is selected from the generated mixture Gaussian distributions (operation 150).
In detail, the generated Gaussian distributions are used to generate one mixture Gaussian distribution through a circular mixing process. That is, if the distance between two Gaussian distributions is smaller than the second threshold value TH2, the two Gaussian distributions are mixed with each other. In order to measure the distance between the two Gaussian distributions, various measuring methods may be used. For example, a divergence distance measuring method expressed by Jd(x)=tr(Sw+Sb) may be used. Here, Sw is a within-divergence matrix and Sb is a between-divergence matrix. Also, a JB method for measuring the Bhaftacharya distance between two Gaussian distributions and a JC method for measuring the Chernoff distance between two Gaussian distributions may be used.
The distance between two Gaussian distributions is computed using equation (5).
Here, if the classes of ωi and ωj are the Gaussian distribution, equation (5) can be expressed as equation (6).
Here, ui and uj are the averages of the Gaussian distributions ωi and ωj, respectively, and Σi and Σj are the covariance matrices of the Gaussian distributions ωi and ωj, respectively. Also, tr indicates the trace of a matrix.
The Gaussian distributions separated having the distance shorter than the second threshold value TH2 are mixed with each other to generate the mixture Gaussian distributions which have new averages and variances. Based on the third threshold value TH3, which is determined by the histogram of the statistics of the generated Gaussian distributions, at least one of the mixture Gaussian distributions having a likelihood exceeding the third threshold value TH3 is selected.
The likelihood refers to the likelihood of the amount of data included in the Gaussian distribution and the value of the likelihood is expressed by equation (7).
Here, φ represents the Gaussian parameter of the Gaussian distribution, x represents a data sample, and N represents the number of the data samples.
The candidate pitches determined in one frame are modeled to one Gaussian distribution and all of the candidate pitches of the speech signal generate the mixture Gaussian distribution. In the present embodiment, the candidate pitches used to generate the Gaussian distribution are the anchor pitches which have a period estimating value greater than the first threshold value. Since the mixture Gaussian distribution is generated from the Gaussian distributions generated using the anchor pitches, the pitch of the speech signal can be more accurately estimated.
Based on the candidate pitches determined from the peak value of the normalized autocorrelation function of the windowed signal and the selected mixture Gaussian distributions, the dynamic programming is performed using the candidate pitches for each of the frames of the speech signal (operation 160). When performing the dynamic programming using the candidate pitches for each of the frames, the distance value for the candidate pitches of each frame is stored so that the candidate pitch having the largest value is tracked as the pitch for the final frame. Operation of executing the dynamic programming on each frame of the speech signal will be described with reference to
Whether the candidate pitch exists in the sub-harmonic frequency range of the average frequency generated using the average frequency and the variance of the selected mixture Gaussian distributions is determined to generate an additional candidate pitch from the candidate pitches in the sub-harmonic frequency range having the largest period estimating values (operation 170). Candidate pitches which are not estimated and are missed in the frame generally have low period estimating values, but may be accurate pitches in some cases. Also, although the candidate pitches estimated in the previous operation have high period estimating values, they may be doubling or halving values of the pitches. In operation 170, the pitches which are not estimated and are missed in operations 110 to 160 are estimated. Operation 170 will be described with reference to
Operations 140 through 170 are repeated until the sum of the local distances of the frames is no longer increased in operation 160 (condition 1) and additional candidate pitches are no longer generated in operation 170 (condition 2) (operation 180). That is, the operations generating the updated Gaussian distributions using the candidate pitches of each frame including the generated additional candidate pitch, generating the mixture Gaussian distributions by mixing the Gaussian distributions which are located within a distance smaller than the second threshold value and selecting the mixture Gaussian distribution having a likelihood greater than the third threshold value are repeated. Based on the selected mixture Gaussian distribution and the candidate pitches including the additional candidate pitches, the dynamic programming is executed again. If condition 1 and condition 2 are satisfied when performing operations 140 through 170, the final pitch is estimated.
During practice of the present embodiment, it was noted that condition 1 and condition 2 were satisfied by repeating operations 140 through 170 two to three times, except when candidate pitches having low period estimating values were scattered and when husky speech was analyzed. However, in order to preferably avoid repeating operations 140 through 170 indefinitely, the number of repetitions may be set to a certain value.
The delay (τ) by which the value of the normalized autocorrelation function of the windowed signal exceeds the fourth threshold value TH4 are determined (operation 510) and the delay satisfying formula (8) among the determined lag values is determined to be the period of the candidate pitch (operation 520).
Rs(τ−1)<Rs(τ)>Rs(τ+1) (8)
The candidate pitch is interpolated using equation (10) (operation 530). Thus, the determined delay, that is, the period of the candidate pitch, is estimated from the interpolated value (x).
After the interpolated value of the candidate pitch period is computed from equation (9), the period estimating value (pr) of the interpolated value is computed using equation (10) (operation 540).
Referring to
On the other hand, the period estimating value is interpolated using sin(x)/x as expressed in equation (10). By using sin(x)/x (referred to as the sinc function), the accuracy of the pitch estimating value is increased by 20%.
The local distance (Dis(f)) of a first frame is computed using equation (11) (operation 710). The first frame has a plurality of the candidate pitches and the local distance between the candidate pitches is computed.
Here, f is a candidate pitch, pr is the period estimating value of a candidate pitch, and σpr is the variance of the period estimating value computed from every candidate pitch. The value of σpr may be set to 1. useg and σseg are the average and the variance of the candidate pitch computed from each frame, respectively, and umix and σmix are the average and the variance of the mixture Gaussian distribution, respectively. Here,
is an estimate of the Gaussian distance between the central frequency of each frame and the candidate pitch. On the other hand,
is an estimate of the Gaussian distance between the closest mixture Gaussian distribution and the candidate pitch. The greater the value of Dis(f), the higher the probability that the candidate pitches are included in the final pitch.
The local distance (Dis2(f, fpre)) between a previous frame and a current frame is computed using equation (12) (operation 720).
Here, fpre is the candidate pitch in the previous frame and the other items between Dis1(f) and Dis2(f, fpre) are
represent the value of f−fpre that is, the Gaussian distance of delta frequency. Accordingly, udf,seg and σdf,seg represent the average and the variance of the delta frequency computed from each frame, respectively, and udf,mix and σdf,mix represent the average and the variance of the delta frequency computed from the mixture Gaussian distribution.
For example, the local distance for the i-th candidate pitch of the first frame is computed as
using equation (12), and the local distance from the i-th candidate pitch of the (n−1)-th frame to the j-th candidate pitch of the n-th frame is given by Measure(n,j)=Max i{Measure(n−1,i)+Dis2(n,j)}. Measure (n, j) is measured up to the final frame N. In the final frame, the largest Measure(N, j) is selected and the j-th candidate pitch is selected to the tracked pitch of the final frame.
Referring to
Here, i is a certain number. For example, if the values of i are 1, 2, 3, and 4, the average frequency of the mixture Gaussian distribution is 900 Hz and the variance thereof is 200 Hz, in the first through fourth sub-harmonic frequency range, the central frequency and the bandwidth are 900 Hz/±100 Hz, 450 Hz/±50 Hz, 300 Hz/±33 Hz and 225 Hz/±25 Hz, respectively. If a plurality of the mixture Gaussian distributions are selected in operation 150 of
Next, it is determined whether the candidate pitches of each frame exist in the generated sub-harmonic frequency range (operations 820 through 840). First, it is determined whether the ratio (P) of the frames having the candidate pitches which exist in the generated sub-harmonic frequency range is greater than a predetermined fifth threshold value TH5 (operation 820), and thus whether the average period verifying value (APR) of the candidate pitches which exist in the sub-harmonic frequency range is greater than a sixth threshold value TH6 (operation 830). If P is greater than the fifth threshold value and APR is greater than the sixth threshold value, it is determined that the candidate pitches exist in the generated sub-harmonic frequency range (operation 840).
If it is determined that the candidate pitches exist in the generated sub-harmonic frequency range in operation 840, the index of the sub-harmonic frequency range, that is, the number by which the average frequency of the mixture Gaussian distribution is divided, is multiplied by the candidate pitch to generate the additional candidate pitch (operation 850). The additional candidate pitch is determined from equation (14).
f={f:f∈bin(j), maxfinNbinspr(f)}×j (14)
Here, f is the frequency of the candidate pitch, bin(j) is the j-th sub-harmonic frequency range of the average frequency of the mixture Gaussian distribution, and N is the number by which the average frequency of the mixture Gaussian distribution is divided. In the above-mentioned example, the average frequency 900 Hz of the mixture Gaussian distribution was divided by 4 and, accordingly, N is 4.
The first candidate pitch determining unit 910 divides a predetermined speech signal into frames and computes the autocorrelation function of the divided frame signal to determine the candidate pitches from the peak value of the autocorrelation function. Referring to
The windowed signal generating unit 1010 receives a predetermined speech signal, divides the speech signal into frames having a predetermined period, and multiplies the divided frame signal by a window signal to generate a windowed signal. The first autocorrelation function generating unit 1020 normalizes the autocorrelation function of the window signal according to equation (1) to generate a normalized autocorrelation function of the window signal. The second autocorrelation function generating unit 1030 normalizes the autocorrelation function of the windowed signal according to equation (2) to generate a normalized autocorrelation function Rs(i) of the windowed signal and the third autocorrelation function generating unit 1040 divides the normalized autocorrelation function of the windowed signal by the normalized autocorrelation function of the window signal according to equation (3) to generate a normalized autocorrelation function of the windowed signal in which the windowing effect is reduced.
The peak value determining unit 1050 of
Referring to
The Gaussian distribution generating unit 930 includes a candidate pitch selecting unit 932 and a Gaussian distribution computing unit 934. The candidate pitch selecting unit 932 selects the candidate pitches having period estimating values greater than the first threshold value TH1 and the Gaussian distribution computing unit 934 computes the average and the variance of each of the selected candidate pitches to generate the Gaussian distributions of the candidate pitches of each frame.
The mixture Gaussian distribution generating unit 940 mixes the Gaussian distributions having distances smaller than the second threshold value TH2 among the generated Gaussian distributions according to equation (5) or equation (6) to generate the Gaussian distributions having new averages and variances. By mixing the Gaussian distributions having distances smaller than the second threshold value TH2 to generate one Gaussian distribution, the Gaussian distribution can be more accurately modeled.
The mixture Gaussian distribution selecting unit 950 selects at least one mixture Gaussian distribution having a likelihood exceeding the third threshold value TH3, which is determined by the histogram of the statistics of the generated Gaussian distributions. The likelihood of the mixture Gaussian distribution is computed using equation (7). By selecting the mixture Gaussian distribution having a likelihood exceeding the third threshold value TH3 with the mixture Gaussian distribution selecting unit 950, only the most reliable mixture Gaussian distribution remains.
The dynamic program executing unit 960 includes a distance computing unit 962 and a pitch tracking unit 964. The distance computing unit 962 computes the local distance for each frame of the speech signal. The local distance for the first frame of the speech signal is computed using equation (11) and the local distances for the remaining frames are computed using equation (12). The pitch tracking unit 964 tracks the path for which the sum of the local distances up to the final frame of the speech signal is largest using Measure(n,j)=Max i{Measure(n−1,i)+Dis2(n,j)} to track the final pitch of the final frame.
The additional candidate pitch reproducing unit 970 determines whether the candidate pitch exists in the sub-harmonic frequency range of the average frequency generated based on the average frequency and the variance of the selected mixture Gaussian distribution to generate the additional candidate pitch from the candidate pitch in the sub-harmonic frequency range having the largest period estimating value.
Referring to
The additional candidate pitch reproducing unit 970 includes a sub-harmonic frequency range generating unit 1310, a second candidate pitch determining unit 1320 and an additional candidate pitch generating unit 1330. The sub-harmonic frequency range generating unit 1310 divides the average frequency and the variance of the selected mixture Gaussian distribution by a predetermined number according to equation (13) to generate the sub-harmonic frequency range of the average frequency corresponding to each predetermined number.
The second candidate pitch determining unit 1320 includes a first determining unit 1322, a second determining unit 1324 and a determining unit 1326. The first determining unit 1322 determines whether the ratio of the frames including the candidate pitches which exist in the sub-harmonic frequency range is greater than the fifth threshold value TH5, and the second determining unit 1324 determines whether the average estimating value of the candidate pitches which exist in the sub-harmonic frequency range is greater than the sixth threshold value TH6. The determining unit 1326 determines that the candidate pitches exist in the generated sub-harmonic frequency range if the ratio of the frames is greater than the fifth threshold value and the average period estimating value is greater than the sixth threshold value based on the determining results of the first determining unit 1322 and the second determining unit 1324.
The additional candidate pitch generating unit 1330 multiplies the candidate pitch having the largest period estimating value among the candidate pitches in the sub-harmonic frequency range by the number generated by the sub-harmonic frequency range according to equation (14) to generate the additional candidate pitch.
Referring back to
Referring to
The track determining unit 980 includes an additional candidate pitch production determining unit 1410, a track determining sub-unit 1420 and a distance comparing unit 1430. The additional candidate pitch production determining unit 1410 determines whether the additional candidate pitch is reproduced by the additional candidate pitch reproducing unit 970 and the distance comparing unit 1430 determines whether the sum of the local distances up to the final frame computed in the pitch tracking unit 964 is greater than the sum of the local distances up to the final frame which was previously computed. The track determining sub-unit 1420 determines whether the pitch track is being continuously repeated according to the determining results of the distance comparing unit 1430 and the additional candidate pitch production determining unit 1410.
G.723 in the table indicates a method of estimating the pitch using G.723 encoding source code, YIN indicates a method of estimating the pitch using matlab source code published by Yin, CC indicates the simplest cross-autocorrelation type of a pitch estimating method, TK1 indicates a pitch estimating method in which DP is performed using only one Gaussian distribution, and AC indicates a method of performing interpolation using sin(x)/x and estimating the pitch using an autocorrelation function. Referring to the table, it is noted that the pitch estimating method according to the present invention has the lowest error ratio at 0.74%.
The above-described embodiments of the present invention can be written as computer programs and can be implemented in general-use digital computers that execute the programs using a computer readable recording medium. Examples of the computer readable recording medium include magnetic storage media (e.g., ROM, floppy disks, hard disks, etc.), optical recording media (e.g., CD-ROMs, or DVDs), and storage media such as carrier waves (e.g., transmission through the Internet).
The pitch estimating method and apparatus according to the above-described embodiments of the present invention can accurately estimate the pitch of audio signal by reproducing the candidate pitches which have been missed due to pitch doubling or pitch halving and can remove the windowing effect in the normalized autocorrelation function of a windowed signal. Also, by interpolating the period estimating value for the period of the candidate pitch using sin(x)/x, the pitch can be more accurately estimated.
Although a few embodiments of the present invention have been shown and described, the present invention is not limited to the described embodiments. Instead, it would be appreciated by those skilled in the art that changes may be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
10-2004-0081343 | Oct 2004 | KR | national |