ΣSigmaStudio Ask AI Русский Log in

VAD for ADAU170x

SigmaDSP & SigmaStudio KJBob May 24, 2012 00:00 7 replies Original on forum ↗
Subscribe
KJBob Question
May 24, 2012 00:00

There's no Vocal Activity Detector block for the ADAU1701/2 so I built one for my application. This one adapts to input levels that vary around nominal, as one might find in use. It works by comparing the instantaneous input sound to its average level, gating the output ON when the former exceeds the latter. The filter and clipper in the average level path are optional but refine its operation a bit. If you omit the filter, replace it with a gain block.

The manual switch demonstrates a way to "freeze" noise floor tracking by feeding the averaged level back upon itself. This point could be instead wired to logic, for example to prevent undesired tracking of inactive inputs. Monitor the circuit's operation with the real time display block, To optimize its performance, test gating operation over the expected input range. Adjust the DC source DC3 to tweak operation at low signal levels, and the filter (or gain block) for high levels. Adjust the clipper threshold for very high levels. Also vary the Hold number in the PeakEnv2 block to adjust the Hang Time.

Audio Signal Processors

adau1702

noise_gate

noise_floor

vocal_activity_detector

SigmaDSP Audio Processors

adau1701

vad

Show More

2746.33b6498f07c080a10bc649b513370e52.jpg
2746.33b6498f07c080a10bc649b513370e52.jpg
2746.33b6498f07c080a10bc649b513370e52.jpg-833x375.jpg
2746.33b6498f07c080a10bc649b513370e52.jpg-833x375.jpg
ADIApproved Reply
May 25, 2012 00:00

Wow! This is a great implementation of a voice detector. Good work. I think this will be very useful for other SigmaDSP users!

KJBob Reply
Jul 22, 2012 00:00

Brett, thank you for your reply, I really appreciate that. My application needed to better distinguish speech from background noise, leading to the improvement shown below:

This revision replaces the peak detector with a clipper and multiplier which form a kind of synchronous rectifier. Coherent signals such as speech (stuff that would show a palpable waveform on a scope) are more likely to hit the clipper, resulting in their being rectified with unity gain. When random noise doesn't reach the clip threshold, the circuit behaves more like a crossover notch and attenuates it. The second multiplier shown is not needed for the VAD but allows for an interesting listening test. It undoes the rectifier's output so you can actually hear background noise drop out when switching the mux from Direct to Test. Voice is distorted but just as loud, while room noise dramatically disappears. The result is better speech / not decisions from the overall VAD circuit. This version works well enough for my needs.

7367.722ad01e4296cbc568be74562ffff4b1.jpg
7367.722ad01e4296cbc568be74562ffff4b1.jpg
7367.722ad01e4296cbc568be74562ffff4b1.jpg-768x334.jpg
7367.722ad01e4296cbc568be74562ffff4b1.jpg-768x334.jpg
ADIApproved Reply
Jul 23, 2012 00:00

Wow! Again, this is really good work. Feel free to post this on our example projects page if you'd like:

https://wiki.analog.com/resources/tools-software/sigmastudio/tutorials

ByronS Reply
Nov 6, 2013 00:00

Can't thank-you enough Bob! This is really great input to the discussion, since it looks very promising for my application where noise floor reduction would go a long long way to making the real speech more intelligible. I'll be trying it out on my system tomorrow to see how well it works.

KJBob Reply
Nov 7, 2013 00:00

Thank you very much Byron! Hope it works out for you.

ByronS Reply
Nov 7, 2013 00:00

One additional question. I'm not clear on where to adjust the threshold level of the gate? Ideally I want to connect an external trimpot to an A/D input and have that control the gating threshold level in terms of amplitude. Please advise.

KJBob Reply
Nov 7, 2013 00:00

My telephone-related application has relatively consistent signal and noise levels, so it only needs a preamp gain control ahead of the DSP -- when the volume is OK the threshold is too. During development I primarily adjusted the DC source adding to the Average Level shown in the schematic, so that's the first adjustment you might wish to make externally available. This is like sliding the noise gate threshold in the compressor graph. I also tweaked the clipper and its following gain in the Sync Detector, which sets up the transition level between signal and noise. Keep these at reciprocal values -- for example when setting the clipper to 0.14, change the gain to 7.