Problemcore
Voice activity detection
Also called VAD, speech activity detection, speech detection.
Mark which frames of an audio signal contain speech and which contain only silence or noise.
Voice activity detection asks, for each short frame of an audio signal, whether it contains speech or only silence and noise. It is a decision problem: the zero-crossing rate and the frame energy are measurements that detectors use, not detectors themselves. The Rabiner-Sambur endpoint detector solves the narrower task of finding one start and one end of an isolated word, while a likelihood ratio VAD labels every frame by a statistical test and can find many speech segments.
In plain words
A recording usually holds speech only part of the time. The rest is pauses, breathing, room noise or traffic. A voice activity detector goes through the recording in small steps of about 10 ms and says "speech" or "no speech" for each step. A phone uses this to send fewer bits when nobody talks, and a speech recognizer uses it to skip the silence. The task is easy when the background is quiet and hard when the noise is loud or sounds like speech, such as music or other people talking. Every detector makes two kinds of mistakes: it can cut off quiet speech, or it can call noise speech, and tuning it trades one mistake for the other.
Definition
Input. A signal sampled at , cut into frames , for example 25 ms frames with a hop of 10 ms. In the batch form all frames are given; in the online form frame must be labeled after at most further frames have arrived.
Output. A label for each frame, where 1 means that the frame contains speech.
Model. Each frame is one of two hypotheses:
where is noise and is speech. This makes each frame a binary statistical hypothesis test.
Quality. Against reference labels , the miss rate is the fraction of speech frames () labeled 0, which clips speech, and the false alarm rate is the fraction of non-speech frames () labeled 1. The frame error rate is the fraction of frames with . A detector with a threshold traces a curve of miss rate against false alarm rate as the threshold moves, and the operating point depends on the application.
Variants
- Endpoint detection. Find only the first and the last speech frame of an utterance that holds one word or one command; see the Rabiner-Sambur endpoint detector.
- Online with bounded delay. Speech coders and telephony need a decision within a few frames. Batch systems, such as preprocessing for speaker diarization, can use the whole recording.
- Segment output. Many systems output speech segments with a start and an end time, after smoothing the frame labels and removing segments that are too short.
- More classes. Some detectors separate speech, music and noise, or detect only the speech of one target speaker.
- Several microphones. With a microphone array, the direction of the sound helps to separate a talker from diffuse noise.
Examples
A quiet room. If the background is digital silence, every frame with nonzero energy is speech, and a threshold on the energy solves the problem exactly.
A word with weak fricatives. Take the synthetic recording of the Rabiner-Sambur example at 16 kHz with 10 ms frames: 30 frames of low-pass background noise, 10 frames of a weak fricative, 50 frames of a tone, 8 frames of the fricative and 30 frames of background, 128 frames in all, of which frames 30 to 97 are speech. A threshold on the energy at its ITL value finds frames 40 to 89 and misses all 18 fricative frames, a miss rate of percent and a frame error rate of percent. Adding the zero-crossing test of Rabiner and Sambur finds frames 30 to 97 and gets every frame right.
Babble noise. When the noise is other people talking, the noise frames have the same spectral shape as speech, and detectors based on energy or on the spectrum make many errors. This case needs models of the target voice or a trained classifier.
Known algorithms
- Energy and zero-crossing thresholds. Thresholds on the short-time energy and the zero-crossing rate, set from a stretch of known silence. The Rabiner-Sambur endpoint detector is the classic example, at time for samples.
- Statistical model tests. Model the DFT coefficients of noise and of speech plus noise as Gaussian, estimate the noise spectrum in non-speech frames, and compare the likelihood ratio of each frame with a threshold. The likelihood ratio VAD of Sohn, Kim and Sung (1999) is this approach, with a hidden Markov smoothing of the decisions.
- Spectral features. Thresholds on the spectral entropy, the spectral flatness, or the long-term spectral divergence from a noise estimate.
- Trained classifiers. Gaussian mixture models on subband energies, or neural networks on log mel energies, trained on labeled speech and noise. These work best on realistic noise, at the cost of training data.
- Smoothing. Nearly every detector adds a hangover, which keeps the speech label for a few frames after the evidence drops, so that weak word endings are not cut, and removes speech segments shorter than a minimum length.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Statistical model voice activity detection | O(F N log N) worst | O(N) extra | deterministicnot exactnot in placeonline | 1 language |
| Rabiner-Sambur endpoint detection | O(L) worst | O(T) extra | deterministicexactnot in placeoffline | 1 language |
Bounds
- Optimal frame test (theorem). If the densities and are known, the Neyman-Pearson lemma shows that a threshold on the likelihood ratio has the smallest miss rate among all frame tests with the same false alarm rate. Every practical detector approximates these densities, and its errors are at least those of this test.
- Errors do not vanish at low SNR (theorem). When speech is weak compared with the noise, the two densities overlap, and the Bayes error of any frame test is bounded below by a positive number that depends only on the overlap of the two densities. Using several frames together, as hangover and HMM smoothing do, lowers the error because speech segments last many frames.
- Time. Any detector must read every sample, so it needs time. Energy detectors run in , and spectral detectors in with frames of samples and a fixed overlap.
- Delay. An online detector with a delay of frames can use only the frames up to . The hangover, and any look-ahead for weak onsets, cost delay.
Reductions
- To hypothesis testing. Each frame decision is a binary test between noise only and speech plus noise, as in the definition.
- To sequence decoding. With a two-state hidden Markov model, one state for speech and one for non-speech, the best label sequence is the HMM decoding of the frame likelihoods, and the transition probabilities give the hangover in a principled way.
- Endpoint detection from VAD. Given frame labels, the first and the last speech frame after smoothing solve endpoint detection, so endpoint detection is no harder than VAD.
- To change-point detection. The boundaries between speech and non-speech are change points of the frame statistics; see change-point detection.
Applications
- Speech coding. Telephone codecs send few or no bits in non-speech frames and let the receiver play comfort noise, which saves bandwidth and power.
- Speech recognition. Recognizers skip non-speech frames, cut long recordings into utterances, and compute cepstral mean normalization over speech frames only.
- Noise estimation. Noise reduction such as spectral subtraction updates its noise spectrum in the frames that the detector marks as non-speech.
- Speaker diarization and keyword spotting. Speaker diarization uses VAD to find the regions to cluster, and keyword spotting uses it to wake the larger model only when someone speaks.
References
- Jongseo Sohn, Nam Soo Kim and Wonyong Sung, A statistical model-based voice activity detection, the frame decision as a likelihood ratio test between noise only and speech plus noise, with Gaussian models of the DFT coefficients
- L. R. Rabiner and M. R. Sambur, An algorithm for determining the endpoints of isolated utterances, The Bell System Technical Journal 54(2), 1975, 297 to 315, the endpoints of an isolated word from energy and zero-crossing thresholds set on the silence at the start
- L. R. Rabiner and R. W. Schafer, Digital Processing of Speech Signals, Prentice Hall, 1978, Chapter 4 (time domain processing of speech), the discussion of speech and silence discrimination with energy and zero-crossing rate
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag B7QV94 Edit this page History Report an error Markdown