Documentation Index

Fetch the complete documentation index at: https://docs.knovvu.com/llms.txt

Use this file to discover all available pages before exploring further.

Noise Gate

Prev Next

Overview

NoiseGate is a filter that treats parts of an audio signal as closed when the signal level is below a certain threshold. Its purpose is to filter out low-level background noise or very weak sounds.

In ElasticVAD, NoiseGate runs before the VAD (Voice Activity Detection) result is produced. The energy level of each frame is checked before the VAD result is generated:

  • If the frame passes the NoiseGate, it is scored by the VAD engine.
  • If the frame does not pass the NoiseGate, the minimum score is assigned.

This allows the VAD engine to evaluate only audio segments that are strong enough. As a result, false positives caused by background noise can be reduced.

NoiseGate is especially useful for improving VAD performance in noisy environments. It helps prevent background noise from triggering barge-in and makes speech tracking more stable.

Best Practice

A NoiseGate threshold is not a fixed universal value. The correct value should be determined based on the microphone gain and ambient noise level of the specific setup.

First, a section containing only background noise should be measured. Then, the threshold should be set above this noise level and below the level of actual speech.

Use Cases

NoiseGate is useful for:

  • Reducing background noise
  • Filtering out very low-level sounds
  • Allowing only sufficiently strong audio segments to pass

How NoiseGate Works

NoiseGate works on a frame-by-frame basis.

Processing Flow

  1. The VAD splits the audio into small frames.
  2. The RMS level is calculated for each frame.
  3. The RMS value is converted to dBFS.
  4. If this value is above the threshold, the gate becomes a candidate to open.
  5. If the signal remains above the threshold for the duration of AttackMs, the gate opens.
  6. When the signal drops below the threshold, the gate does not close immediately.
  7. It stays open for the duration of HoldMs, then closes.
  8. Frames processed while the gate is open are scored by the VAD engine with a value between 0.0 and 1.0.
  9. Frames processed while the gate is closed receive the minimum score.

This structure helps suppress short noise bursts and provides more stable speech tracking.

Note

Since the audio is processed frame by frame, AttackMs and HoldMs are converted into a number of frames in milliseconds and rounded up.

For example, assume AttackMs is set to 20 ms. For Silero, the frame duration is 32 ms:

20 / 32 ≈ 0.625 frames

This value is rounded up to approximately 1 frame. Therefore, an AttackMs value between 0 and 32 ms is evaluated as 1 frame.

Items.gif

Parameters

Enabled

Enables or disables NoiseGate.

Value Description
true NoiseGate is enabled.
false NoiseGate is disabled.

If disabled, all frames are passed through.

GateThresholdDbfs

Defines the audio level threshold that determines whether the gate should open.

Unit: dBFS

  • More negative value: More sensitive. The quieter the recording environment is, the lower this value should be.
  • Higher value: More selective. The noisier the recording environment is, the higher this value should be.

Example Values

Value Behavior
-32 Default
-40 Passes more audio
-15 Passes less audio

![NoiseGate threshold levels](/.attachments/threshold_legend-093b4c3b-fd3f-460b-9e91-d18a40e36abc.png =800x)

AttackMs

Defines how long the signal must remain above the threshold before the gate opens.

  • Smaller value: The gate opens faster.
  • Larger value: Short sound bursts are filtered out more easily.

HoldMs

Defines how long the gate remains open after the signal drops below the threshold.

  • Smaller value: The gate closes faster.
  • Larger value: Short pauses between words are preserved.

Configuration Example

To enable NoiseGate while configuring VAD parameters, use the following configuration:

VadParameters vadParams;

vadParams.NoiseGate.Enabled = true;
vadParams.NoiseGate.GateThresholdDbfs = -32;
vadParams.NoiseGate.AttackMs = 50;
vadParams.NoiseGate.HoldMs = 100;

Summary

NoiseGate is a simple but effective filter used to remove low-level sounds.

Parameter Description
Threshold How strong should the audio be to pass?
Attack How long should the signal stay above the threshold before opening?
Hold How long should the gate remain open before closing?

In ElasticVAD, NoiseGate plays an important role in improving VAD performance and reducing false positives caused by noise. With the right parameters, it can provide more reliable results, especially in noisy environments.