Abstract:
Apparatus for detecting a fundamental frequency in speech utilizing a plurality of voiced detectors and selecting one of those detectors to make the voicing decision utilizing distance measurement values with each value generated by one of the voiced detectors. The voiced detector selected is the one which generated the best distance measurement value. The distance measurement value may be the Mahalanobis distance value or Hotelling&#39;s two-sample T 2  statistic. Two types of voiced detectors are disclosed: statistical voiced detectors and discriminant voiced detectors. The disclosed statistical voiced detector adapts to changing speech environments by detecting changes in the voice environment in response to classifiers that define certain attributes of the speech.

Description:
This application is a continuation of application Ser. No. 07/034,297, filed on Apr. 3, 1987, now abandoned. 
    
    
     This invention relates to determining whether or not speech has a fundamental frequency present. This is also referred to as a voicing decision. More particularly, the invention is directed to selecting one of a plurality of voiced detectors which are concurrently processing speech samples for making the voicing decision with the selection being based on a distance measurement calculation. 
     BACKGROUND AND PROBLEM 
     In low bit rate voice coders, degradation of voice quality is often due to inaccurate voicing decisions. The difficulty in correctly making these voicing decisions lies in the fact that no single speech classifier can reliably distinguish voiced speech from unvoiced speech. The use of multiple voiced detectors and the selection of one of these detectors to make the determination of whether the speech is voiced or unvoiced is disclosed in the paper of J. P. Campbell, et al., &#34;Voiced/Unvoiced Classification of Speech with Applications to the U.S. Government LPC-10E Algorithm&#34;, IEEE International Conference on Acoustics, Speech, and Signal Processing, 1986, Tokyo, Vol. 9.11.4, pp. 473-476. This paper discloses the utilization of multiple linear discriminant voiced detectors each utilizing different weights and threshold values to process the same speech classifiers for each frame of speech. The weights and thresholds for each detector are determined by utilizing training data. For each detector, a different level of white noise is added to the training data. During the processing of actual speech, the detector to be utilized to make the voicing decision is determined by examining the signal-to-noise ratio, SNR. The range of possible values that the SNR can have is subdivided into subranges with each subrange being assigned to one of the detectors. For each frame, the SNR is calculated, the subrange is determined, and the detector associated with this subrange is selected to make the voicing decision. 
     A problem with the prior art approach is that it does not perform well with respect to a speech environment in which characteristics of the speech itself have been altered. In addition, the method used by Campbell is only adapted to white noise and cannot adjust for colored noise. Therefore, there exists a need for a method of selecting between a plurality of voiced detectors that allows detection in a varying speech environment. 
     SOLUTION 
     The above described problem is solved and a technical advance is achieved by a voiced decision apparatus that selects between a plurality of voiced detectors by comparing separation or merit values generated by each of the voiced detectors. The separation values are also referred to as distance measurements. 
     Advantageously, the apparatus comprises different types of voiced detectors such as discriminant and statistical detectors each generating a separation value. A comparator within the apparatus selects the voiced detector to make the determination whether the speech is voiced or unvoiced that is generating the largest separation value. Advantageously, the separation value may be a statistical, generalized distance value. 
     All of the voiced detectors indicate whether a frame is voiced or unvoiced and each of the detectors first determines a discriminant variable for each one of the present and previous frames. After determining the variable, each of the detectors determines mean values for both voiced and unvoiced ones of the previous and present frames. Each detector determines variance values for voiced and unvoiced ones of the previous and present frames. After calculating the means and the variances, each detector determines the separation value from the mean and variance values for the voiced frames and the mean and variance values for the unvoiced frames. 
     Advantageously, the determination of the separation values is performed in each detector by combining variance values into a weighted sum. The mean value of each of the unvoiced frames is subtracted from the mean value of each of the voiced frames. This subtracted value is squared for each of the frames and the weighted sum of the variance values is divided into the resulting squared subtracted value. Advantageously, before forming the weighted sum, each detector multiplies the variance value for the voiced frames by the probability of a voiced frame occurring, and multiplies the variance value for the unvoiced frames by the probability of an unvoiced frame occurring. In addition, before dividing the squared subtracted value by weighted sum, the squared subtracted value is multiplied by the probabilities of a voiced frame occurring and unvoiced frame occurring. 
     The method comprises the steps of calculating a first merit value defining the separation between voiced and unvoiced frames by the discriminant detector, calculating a second merit value defining separation between voiced and unvoiced frames by said statistical voiced detector, and selecting the detector that calculated the best merit value to indicate whether a frame is voiced or unvoiced. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     The invention may be better understood from the following detailed description which when read with reference to the drawing in which: 
     FIG. 1 is a block diagram illustrating the present invention; 
     FIG. 2 illustrates, in block diagram form, statistical voice detector 103 of FIG. 1; 
     FIGS. 3 and 4 illustrate, in greater detail, the functions performed by statistical voiced detector 103 of FIG. 2; and 
     FIG. 5 illustrates, in greater detail, functions performed by block 340 of FIG. 4. 
    
    
     DETAILED DESCRIPTION 
     FIG. 1 illustrates an apparatus for performing the unvoiced/voiced decision operation by selecting between one of two voiced detectors. It would obvious to one skilled in the art to use more than two voiced detectors in FIG. 1. The selection between detectors 102 and 103 is based on a distance measurement that is generated by each detector and transmitted to distance comparator 104. Each generated distance measurement represents a merit value indicating the correctness of the generating detector&#39;s voicing decision. Distance comparator 104 compares the two distance measurement values and controls a multiplexer 105 such that the detector generating the greatest distance measurement value is selected to make the unvoiced/voiced decision. However, for other types of measurements, the lowest merit value would indicate the detector making the most accurate voicing decision Advantageously, the distance measurement may be the Mahalanobis distance. Advantageously, detector 102 is a discriminant detector, and detector 103 is a statistical detector. However, it would be obvious to one skilled in the art that the detectors could all be of the same type and that there could be more than two detectors present in the system. 
     Consider now the overall operation of the apparatus illustrated in FIG. 1. Classifier generator 101 is responsive to each frame of speech to generate classifiers which advantageously may be the log of the speech energy, the log of the LPC gain, the log area ratio of the first reflection coefficient, and the squared correlation coefficient of two speech segments one frame long which are offset by one pitch period. The calculation of these classifiers involves digitally sampling analog speech, forming frames of the digital samples, and processing those frames and is well known in the art. In addition, Appendix A illustrates a program routine for calculating those classifiers. Generator 101 transmits the classifiers to detectors 102 and 103 via path 106. 
     Detectors 102 and 103 are responsive to the classifiers received via path 106 to make unvoiced/voiced decisions and transmit these decisions via paths 107 and 110, respectively, to multiplexer 105. In addition, the detectors determine a distance measure between voiced and unvoiced frames and transmit these distances via paths 108 and 109 to comparator 104. Advantageously, these distances may be Mahalanobis distances or other generalized distances. Comparator 104 is responsive to the distances received via paths 108 and 109 to control multiplexer 105 so that the latter multiplexer selects the output of the detector that is generating the largest distance. 
     FIG. 2 illustrates, in greater detail, statistical voiced detector 103. For each frame of speech, a set of classifiers also referred to as a vector of classifiers is received via path 106 from classifier generator 101. Silence detector 201 is responsive to these classifiers to determine whether or not speech is present in the present frame. If speech is present, detector 201 transmits a signal via path 210. If no speech (silence) is present in the frame, then only subtractor 207 and U/V determinator 205 are operational for that particular frame. Whether speech is present or not, the unvoiced/voiced decision is made for every frame by determinator 205. 
     In response to the signal from detector 201, classifier averager 202 maintains an average of the individual classifiers received via path 106 by averaging in the classifiers for the present frame with the classifiers for previous frames. If speech (non-silence) is present in the frame, silence detector 201 signals statistical calculator 203, generator 206, and averager 202 via path 210. 
     Statistical calculator 203 calculates statistical distributions for voiced and unvoiced frames. In particular, calculator 203 is responsive to the signal received via path 210 to calculate the overall probability that any frame is unvoiced and the probability that any frame is voiced. 
     In addition, statistical calculator 203 calculates the statistical value that each classifier would have if the frame was unvoiced and the statistical value that each classifier would have if the frame was voiced. Further, calculator 203 calculates the covariance matrix of the classifiers. Advantageously, that statistical value may be the mean. The calculations performed by calculator 203 are not only based on the present frame but on previous frames as well. Statistical calculator 203 performs these calculations not only on the basis of the classifiers received for the present frame via path 106 and the average of the classifiers received path 211 but also on the basis of the weight for each classifier and a threshold value defining whether a frame is unvoiced or voiced received via path 213 from weights calculator 204. 
     Weights calculator 204 is responsive to the probabilities, covariance matrix and statistical values of the classifiers for the present frame as generated by calculator 203 and received via path 212 to recalculate the values used as weight vector a, for each of the classifiers and the threshold value b, for the present frame Then, these new values of a and b are transmitted back to statistical calculator 203 via path 213. 
     Also, weights calculator 204 transmits the weights and the statistical values for the classifiers in both the unvoiced and voiced regions via path 214, determinator 205, and path 208 to generator 206. The latter generator is responsive to this information to calculate the distance measure which is subsequently transmitted via path 109 to comparator 104 as illustrated in FIG. 1. 
     U/V determinator 205 is responsive to the information transmitted via paths 214 and 215 to determine whether or not the frame is unvoiced or voiced and to transmit this decision via path 110 to multiplexer 105 of FIG. 1. 
     Consider now in greater detail the operation of each block illustrated in FIG. 2 which is now given in terms of vector and matrix mathematics. Averager 202, statistical calculator 203, and weights calculator 204 implement an improved EM algorithm similar to that suggested in the article by N. E. Day entitled &#34;Estimating the Components of a Mixture of Normal Distributions&#34;, Biometrika, Vol. 56, no. 3, pp. 463-474, 1969. Utilizing the concept of a decaying average, classifier averager 202 calculates the average for the classifiers for the present and previous frames by calculating following equations 1, 2, and 3: 
     
         n=n+1 if n&lt;2000 (1)                                        (1) 
    
     z=1/                                                       (2) 
     
         X.sub.n =(1-z) X.sub.n -1+zx.sub.n                         (3) 
    
     x n  is a vector representing the classifiers for the present frame, and n is the number of frames that have been processed up to 2000. z represents the decaying average coefficient, and X n  represents the average of the classifiers over the present and past frames. Statistical calculator 203 is responsive to receipt of the z, x n  and X n  information to calculate the covariance matrix, T, by first calculating the matrix of sums of squares and products, Q n , as follows: 
     
         Q.sub.n =1-z)Q.sub.n-1 +zx.sub.n x&#39;.sub.n.                 (4) 
    
     After Q n  has been calculated, T is calculated as follows: 
     
         T=Q.sub.n -X.sub.n X&#39;n.                                    (5) 
    
     The means are subtracted from the classifiers as follows: 
     
         x.sub.n =x.sub.n -X.sub.n                                  (6) 
    
     Next, calculator 203 determines the probability that the frame represented by the present vector x n  is unvoiced by solving equation 7 shown below where, advantageously, the components of vector a are initialized as follows: component corresponding to log of the speech energy equals 0.3918606, component corresponding to log of the LPC gain equals -0.0520902, component corresponding to log area ratio of the first reflection coefficient equals 0.5637082, and component corresponding to squared correlation coefficient equals 1.361249; and b initially equals -8.36454: ##EQU1## After solving equation 7, calculator 203 determines the probability that the classifiers represent a voiced frame by solving the following: 
     
         P(v↑x.sub.n)=1-P(u↑x.sub.n)                    (8) 
    
     Next, calculator 203 determines the overall probability that any frame will be unvoiced by solving equation 9 for p n  : 
     
         p.sub.n =(1-z)p.sub.n-1 +zP(u↑x.sub.n).              (9) 
    
     After determining the probability that a frame will be unvoiced, calculator 203 then determines two vectors, u and v, which give the mean values of each classifier for both unvoiced and voiced type frames. Vectors u and v are the statistical averages for unvoiced and voiced frames, respectively. Vector u, statistical average unvoiced vector, contains the mean values of each classifier if a frame is unvoiced; and vector v, statistical average voiced vector, gives the mean value for each classifier if a frame is voiced. Vector u for the present frame is solved by calculating equation 10, and vector v is determined for the present frame by calculating equation 11 as follows: 
     
         u.sub.n =(1-z)u.sub.n-1 +zxnP(u↑x.sub.n)/p.sub.n -zx.sub.n (10) 
    
     
         v.sub.n =(1-z)v.sub.n-1 +zxnP(v↑x.sub.n)/(1-pn)-zx.sub.n (11) 
    
     Calculator 203 now communicates the u and v vectors T matrix, and probability p to weights calculator 204 via path 212. 
     Weights calculator 204 is responsive to this information to calculate new values for vector a and scalar b. These new values are then transmitted back to statistical calculator 203 via path 213. This allows detector 103 to adapt rapidly to changing environments. Advantageously, if the new values for vector a and scalar b are not transmitted back to statistical calculator 203, detector 103 will continue to adapt to changing environments since vectors u and v are being updated. As will be seen, determinator 205 uses vectors u and v as well as vector a and scalar b to make the voicing decision. If n is greater than advantageously 99, vector a and scalar b are calculated as follows. Vector a is determined by solving the following equation: ##EQU2## Scalar b is determined by solving the following equation: ##EQU3## After calculating equations 12 and 13, weights calculator 204 transmits vectors a, u, and v to block 205 via path 214. If the frame contained silence only equation 6 is calculated. 
     Determinator 205 is responsive to this transmitted information to decide whether the present frame is voiced or unvoiced. If the element of vector (v n  -u n ) corresponding to power is positive, then, a frame is declared voiced if the following equation is true: 
     
         a&#39;x.sub.n -a&#39;(u.sub.n +v.sub.n)/2&gt;0;                       (14) 
    
     or if the element of vector (v n  -u n ) corresponding to power is negative, then, a frame is declared voiced if the following equation is true: 
     
         a&#39;x.sub.n -a&#39;(u.sub.n +v.sub.n)/2&lt;0;                       (15) 
    
     Equation 14 can also be rewritten as: 
     
         a&#39;x.sub.n +b-log[(1-p.sub.n)/p.sub.n ]&gt;0. 
    
     Equation 15 can also be rewritten as: 
     
         a&#39;x.sub.n +b-log[(1-p.sub.n)/p.sub.n ]&lt;0. 
    
     If the previous conditions are not meet, determinator 205 declares the frame unvoiced Equations 14 and 15 represent decision regions for making the voicing decision. The log term of the rewritten forms of equations 14 and 15 can be eliminated with some change of performance. Advantageously, in the present example, the element corresponding to power is the log of the speech energy. 
     Generator 206 is responsive to the information received via path 214 from calculator 204 to calculate the distance measure, A, as follows. First, the discriminant variable, d, is calculated by equation 16 as follows: 
     
         d=a&#39;x.sub.n +b-log[(1-p.sub.n)/p.sub.n ].                  (16) 
    
     Advantageously, it would be obvious to one skilled in the art to use different types of voicing detectors to generate a value similar to d for use in the following equations. One such detector would be an auto-correlation detector. If the frame is voiced, the equations 17 through 20 are solved as follows: 
     
         m.sub.1 =(1-z)m.sub.1 +zd,                                 (17) 
    
     
         s.sub.1 =(1-z)s.sub.1 +zd.sup.2, and                       (18) 
    
     
         k.sub.1 =s.sub.1 -m.sub.1.sup.2                            (19) 
    
     where m 1  is the mean for voiced frames and k 1  is the variance for voiced frames. 
     The probability, P d , that determinator 205 will declare a frame unvoiced is calculated by the following equation: 
     
         P.sub.d =(1-z)P.sub.d.                                     (20) 
    
     Advantageously, P d  is initially set to 0.5. 
     If the frame is unvoiced, equations 21 through 24 are solved as follows: 
     
         m.sub.0 =(1-z)m.sub.0 +zd,                                 (21) 
    
     
         s.sub.0 =(1-z)s.sub.0 +zd.sup.2,and                        (22) 
    
     
         k.sub.0 =s.sub.0 -m.sub.0.sup.2.                           (23) 
    
     The probability, P d , that determinator 205 will declare a frame unvoiced is calculated by the following equation: 
     
         P.sub.d= (1-z)P.sub.d +z.                                  (24) 
    
     After calculating equation 16 through 22 the distance measure or merit value is calculated as follows: ##EQU4## Equation 25 uses Hotelling&#39;s two-sample T 2  statistic to calculate the distance measure. For equation 25, the larger the merit value the greater the separation. However, other merit values exist where the smaller the merit value the greater the separation. Advantageously, the distance measure can also be the Mahalanobis distance which is given in the following equation: ##EQU5## 
     Advantageously, a third technique is given in the following equation: ##EQU6## 
     Advantageously, a fourth technique for calculating the distance measure is illustrated in the following equation: 
     
         A.sup.2 =a&#39;(v.sub.n -u.sub.n)                              (28) 
    
     Discriminant detector 102 makes the unvoiced/voiced decision by transmitting information to multiplexer 105 via path 107 indicating a voiced frame if a&#39;x+b&gt;0. If this condition is not true, then detector 102 indicates an unvoiced frame. The values for vector a and scalar b used by detector 102 are advantageously identical to the initial values of a and b for statistical voiced detector 103. 
     Detector 102 determines the distance measure in a manner similar to generator 206 by performing calculations similar to those given in equations 16 through 28. 
     In flow chart form, FIGS. 3 and 4 illustrate, in greater detail, the operations performed by statistical voiced detector 103 of FIG. 2. Blocks 302 and 300 implement blocks 202 and 201 of FIG. 2, respectively. Blocks 304 through 318 implement statistical calculator 203. Blocks 320 and 322 implement weights calculator 204, and blocks 326 through 338 implement block 205 of FIG. 2. Generator 206 of FIG. 2 is implemented by block 340. Subtractor 207 is implemented by block 308 or block 324. 
     Block 302 calculates the vector which represents the average of the classifiers for the present frame and all previous frames. Block 300 determines whether speech or silence is present in the present frame; and if silence is present in the present frame, the mean for each classifier is subtracted from each classifier by block 324 before control is transferred to decision block 326 However, if speech is present in the present frame, then the statistical and weights calculations are performed by blocks 304 through 322. First, the average vector is found in block 302. Second, the sums of the squares and products matrix is calculated in block 304. The latter matrix along with the vector X representing the mean of the classifiers for the present and past frames is then utilized to calculate the covariance matrix, T, in block 306. The mean X is then subtracted from the classifier vector x n  in block 308. 
     Block 310 then calculates the probability that the present frame is unvoiced by utilizing the current weight vector a, the current threshold value b, and the classifier vector for the present frame, x n . After calculating the probability that the present frame is unvoiced, the probability that the present frame is voiced is calculated by block 312. Then, the overall probability, p n , that any frame will be unvoiced is calculated by block 314. 
     Blocks 316 and 318 calculate two vectors: u and v. The values contained in vector u represent the statistical average values that each classifier would have if the frame were unvoiced. Whereas, vector v contains values representing the statistical average values that each classifier would have if the frame were voiced. The actual vectors of classifiers for the present and previous frames are clustered around either vector u or vector v. The vectors representing the classifiers for the previous and present frames are clustered around vector u if these frames are found to be unvoiced; otherwise, the previous classifier vectors are clustered around vector v. 
     After execution of blocks 316 and 318, control is transferred to decision block 320. If N is greater than 99, control is transferred to block 322; otherwise, control is transferred to block 326. Upon receiving control, block 322 then calculates a new weight vector a and a new threshold value b. The vector a and value b are used in the next sequential frame by the preceding blocks in FIG. 3. Advantageously, if N is required to be greater than infinity, vector a and scalar b will never be changed, and detector 103 will adapt solely in response to vectors v and u as illustrated in blocks 326 through 338. 
     Blocks 326 through 338 implement u/v determinator 205 of FIG. 2. Block 326 determines whether the power term of vector v of the present frame is greater than or equal to the power term of vector u. If this condition is true, then decision block 328 is executed. The latter decision block determines whether the test for voiced or unvoiced is met. If the frame is found to be voiced in decision block 328, then the frame is so marked as voiced by block 330 otherwise the frame is marked as unvoiced by block 332. If the power term of vector v is less than the power term of vector u for the present frame, blocks 334 through 338 function are executed and function in a similar manner. Finally, block 340 calculates the distance measure. 
     In flow chart form, FIG. 5 illustrates, in greater detail the operations performed by block 340 of FIG. 4. Decision block 501 determines whether the frame has been indicated as unvoiced or voiced by examining the calculations 330, 332, 336, or 338. If the frame has been designated as voiced, path 507 is selected. Block 510 calculates probability P d , and block 502 recalculates the mean, m 1 , for the voiced frames and block 503 recalculates the variance, k 1 , for voiced frames. If the frame was determined to be unvoiced, decision block 501 selects path 508. Block 509 recalculates probability P d , and block 504 recalculates mean, m 0 , for unvoiced frames, and block 505 recalculates the variance k 0  for unvoiced frames. Finally, block 506 calculates the distance measure by performing the calculations indicated. 
     A routine for implementing generator 100 of FIG. 1 is illustrated in Appendix A, and another routine that implements blocks 102 through 105 of FIG. 1 is illustrated in Appendix B. The routines of Appendices A and B are intended for execution on a Digital Equipment Corporation&#39;s VAX 11/780-5 computer system or a similar system. 
     It is to be understood that the afore-described embodiment is merely illustrative of the principles of the invention and that other arrangements may be devised by those skilled in the art without departing from the spirit and the scope of the invention. In particular, the calculations performed per frame or set could be performed for a group of frames or sets. ##SPC1##