Post Go back to editing

VAD for ADAU170x

     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.
  • Wow! This is a great implementation of a voice detector. Good work. I think this will be very useful for other SigmaDSP users!

  • 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.
  • Wow! Again, this is really good work. Feel free to post this on our example projects page if you'd like:

  • 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.

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

  • 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.

  •      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.