This invention relates to signal-classification in general and to voice-activity detection in particular.
Voice-activity detection (VAD) is used to detect a voice signal in a signal that has unknown characteristics. Numerous VAD devices are known in the art. They tend to follow a common paradigm comprising a pre-processing stage, a feature-extraction stage, a thresholds comparison stage, and an output-decision stage.
The pre-processing stage places the input audio signal into a form that better facilitates feature extraction. The feature-extraction stage differs widely from algorithm to algorithm, but commonly-used features include (1) energy, either full-band, multi-band, low-pass, or high-pass, (2) zero crossings, (3) the frequency-domain shape of the signal, (4) periodicity measures, and (5) statistics of the speech and background noise. The thresholds comparison stage then uses the selected features and various thresholds of their values to determine if speech is present in or absent from the input audio signal. This usually involves use of some “hold-over” algorithm, or “on”-time minimum threshold, to ensure that detection of either presence or absence of speech lasts for at least a minimum period of time and does not oscillate on-and-off.
Some known VAD methods require a measurement of the background noise a-priori in order to set the thresholds for later comparisons. These algorithms fail when the acoustics environment changes over time. Hence, these algorithms are not particularly robust. Other known VAD methods are automatic and do not require a-priori measurement of background noise. These tend to work better in changing acoustic environments. However, they can fail when background noise has a large energy and/or the characteristics of the noise are similar to those of speech. (For example, the G.729 VAD algorithm incorrectly generates “speech detected” output when the input audio signal is a keyboard sound.) Hence, these algorithms are not particularly robust either.
This invention is directed to solving these and other problems and disadvantages of the prior art. Generally, according to the invention, voice activity detection uses a ratio of high-frequency signal energy and low-frequency signal energy to detect voice. The advantage of using this measure is that it can distinguish between speech and keyboard sounds better than simply using high-frequency energy or low-frequency energy alone. Preferably, voice activity detection further uses a periodicity measure of the signal. While a periodicity measure has been used in speech codecs for pitch-period estimation and voiced/unvoiced classification, it is used here to distinguish between speech and background noise. Also preferably, voice activity detection further uses total signal energy to detect voice. Significantly, however, no initial decision about detection is based on the total energy level alone. This makes the detection less susceptible to non-speech changes in the acoustic environment, for example, to volume changes or to loud non-speech sounds such as keyboard sounds. Furthermore, this makes it possible to use the detection for very low-energy speech, which in turn makes the detection more robust in situations where a poor-quality microphone is used or where the microphone recording-level is low.
Specifically according to the invention, voice activity detection involves determining a difference between (a) an average ratio of energy above a first threshold frequency in a signal—illustratively the signal energy between about 2400 Hz and about 4000 Hz—and (b) energy below the first threshold frequency in the signal—illustratively the signal energy between about 100 Hz and 2400 Hz—and (b) a present ratio of the energy above the first threshold frequency in the signal and energy below the first threshold frequency in the signal, and indicating that the signal includes a voice signal if the difference is either exceeded by a first threshold value or exceeds a second threshold value that is greater than the first threshold value. Preferably, the noise energy—illustratively, energy in the signal below about 100 Hz—is removed from the signal prior to the determining, so as to eliminate effects of noise energy on voice activity detection.
Preferably, the voice activity detection further involves determining the average periodicity of the signal, and indicating that the signal includes a voice signal if the average periodicity is lower than a third threshold value. Illustratively, determining the average periodicity involves estimating a pitch period of the signal, determining a gain value of the signal over the pitch period as a function of the estimated pitch period, and estimating a periodicity of the signal over the pitch period as a function of the estimated pitch period and the gain value.
Further preferably, the voice activity detection further involves determining a difference between an average total energy in the signal—illustratively the total energy in the voiceband from about 100 Hz to about 4000 Hz—and present total energy is the signal, and indicating that the signal includes a voice signal if the difference between the average total energy and the present total energy exceeds a fourth threshold value and the average periodicity of the signal is lower than a fifth threshold value.
Further preferably, the voice activity detection is performed on successive segments of the signal—illustratively on each 80 samples of the signal taken at a rate of 8 KHz. If there is not an indication that voice has been detected in the present segment but there is an indication that voice has been detected in the preceding segment, a determination is made of whether the average total energy of the signal exceeds a minimum average total energy of the signal by a sixth threshold value. If so, an indication is made that a voice signal has been detected in the present segment of the signal.
While the invention has been characterized in terms of method steps, it also encompasses apparatus that performs the method steps. The apparatus preferably includes an effecter—any entity that effects the corresponding step, unlike a means—for each step. The invention further encompasses any computer-readable medium containing instructions which, when executed in a computer, cause the computer to perform the method steps.
These and other features and advantages of the present invention will become more apparent from the following description of an illustrative embodiment of the invention considered together with the drawing.
According to the invention, an illustrative embodiment of VAD 100 takes the form shown in
Periodicity
The periodicity calculation involves first estimating a pitch period (T) 206 of the speech signal. Pitch-period estimation is known in speech processing. The illustrative method used here may be found in L. R. Rabiner and R. W. Schafer, Digital Processing of Speech Signals, Prentice Hall, Englewood Cliffs, N.J. (1978), pp. 149–150. The value of pitch period T that minimizes the average magnitude difference function below is calculated as:
where x[n] n=0, 1 . . . N−1 is the input signal to pitch period 206 calculation. This is computed for T=Tmin, Tmin+1, . . . , Tmax. The constants Tmin and Tmax are the lower and upper limits of the pitch period, respectively. The values chosen here are 19 and 80. The value that minimizes the above function is represented as Topt. After finding Topt, a periodicity (C) 208 is illustratively computed in a similar way to computation of the pitch prediction filter parameters used in speech codecs and detailed in R. A. Salami et al., “Speech Coding”, Mobile Radio Communications, R. Steele (ed.), Pentech Press, London (1992) pp. 245–253. A gain value (A) is computed as:
The periodicity C is then given by:
When the signal is fully periodic, C is 0. Conversely, when the signal is random, C is 1.
Total Voiceband Energy
The total voiceband energy (Ef) 214 is computed for the voiceband frequency range from 100 Hz to 4000 Hz. The total voiceband energy in decibels is given by:
where x[n] n=0, 1, . . . , N−1 is the input signal to total voiceband energy 214 calculation.
High-low Frequency Energy Ratio
Energy ratio (Er) 224 is computed as the ratio of energy above 2400 Hz to the energy below 2400 Hz in the input voiceband signal. To obtain the high-frequency signal, the output of high-pass filter 204 is passed through a second high-pass filter 220 that has a cut-off frequency of 2400 Hz. The energy in decibels of the high-frequency signal is given by:
where xh[n] is the signal output by high-pass filter 220. The high-low energy ratio (Er) 224 is then given by:
where Ef is the total voiceband energy 214.
To make the algorithm operate automatically, initial values of the parameters Ef, Er, and C are computed for the first Ni frames that enter VAD 100 following initialization. Here Ni has been chosen as 32. During this stage of computation, the minimum value of Ef is computed and is denoted as Emin. For every subsequent frame, running averages 212, 218, 228 are used together with smoothing of the parameters to make the algorithm less sensitive to local fluctuations. For the total voiceband energy and the energy ratio, differences 216 and 226, respectively, between the smoothed frame values and the running averages are computed. These are denoted by ΔEf and ΔEr. The minimum energy value Emin is also updated, illustratively every 20 frames.
After feature extraction, a comparison of the parameters is made with several thresholds to generate an initial VAD (IVAD), at thresholds comparison block 230. The procedure for this is illustrated in the flowchart of
Threshold comparison 230 is performed anew for every frame processed by VAD 100. Upon startup of thresholds comparison 230, at step 300 of
After thresholds comparison 230 has been made to determine the value of IVAD, a final output decision is made at block 232. A flowchart describing this block is shown in
Upon startup of VAD 100, the values of a holdover flag HVAD and a final VAD flag FVAD are initialized to zero, at step 400. Upon receipt of an IVAD value from block 230, at step 402, output decision 232 checks whether the received value of IVAD is one, at step 404. If so, it means that speech has been detected, as indicated at step 406. Output decision 232 therefore sets HVAD to one, at step 408, and sets FVAD to one, at step 418. The value of FVAD constitutes output 234 of VAD 100. If the value of IVAD is found to be zero at step 404, speech has not been detected, as indicated at step 409. However, output decision 232 checks if the value of HVAD is set to one from a previous frame, at step 410. If so, output decision 232 further checks if the smoothed value of Ef less the value of Emin is greater than 8 dB, at step 412. If so, holdover is indicated, at step 414, and so output decision 232 maintains FVAD set to one, at step 418, even though speech has not been detected. If the value of HVAD is found to be zero at step 410, or if the difference between the smoothed energy and the minimum energy computed at step 412 has fallen to less than 8 dB, speech is not detected and there is no hold-over, as indicated at step 415. Output decision 232 therefore sets the values of HVAD and FVAD to zero, at step 416. Following step 416 or 418, output decision 232 ends its operation, at step 420, until the next IVAD value is received at step 402.
Of course, various changes and modifications to the illustrative embodiment described above will be apparent to those skilled in the art. For example, the noise-energy filter may be dispensed with. A different value may be used for the high/low frequency threshold. Sampling of the input signal may be affected at a different rate, especially at higher rates. The uppermost frequency of the voice band is subsequently increased. The holdover may be dispensed with and the initial VAD output IVAD may be used as the final VAD output. A different procedure may be used to estimate the pitch period or, the combined threshold comparison of the energy and periodicity may be replaced with a single energy threshold comparison. Such changes and modifications can be made without departing from the spirit and the scope of the invention and without diminishing its attendant advantages. It is therefore intended that such changes and modifications be covered by the following claims except insofar as limited by the prior art.
Number | Name | Date | Kind |
---|---|---|---|
4074069 | Tokura et al. | Feb 1978 | A |
6275794 | Benyassine et al. | Aug 2001 | B1 |
6453291 | Ashley | Sep 2002 | B1 |
6456964 | Manjunath et al. | Sep 2002 | B2 |
6504838 | Kwan | Jan 2003 | B1 |
6687668 | Kim et al. | Feb 2004 | B2 |
Number | Date | Country | |
---|---|---|---|
20020165711 A1 | Nov 2002 | US |