A NoiseSuppression node is used to condition the output from a microphone. It helps remove background noise and reduce network bandwidth by suppressing background audio.

  • In "suppress" mode, the node uses DNN (Deep Neural Network) noise suppression to automatically suppress background noise and remove noise from a speech signal.

  • In "gate" mode (the default), the node uses a traditional noise gate to suppress audio at levels below an adjustable threshold.

Both modes reduce network traffic and CPU load when blocking background noise, but DNN noise suppression is more computationally expensive than the simple noise gate.

A NoiseSuppression node can also be used to mute audio while maintaining the audio stream so that, for example, position Metadata continues to be sent.

Example

const noiseSuppression = new NoiseSuppression(audioContext);
noiseSuppression.setMode('suppress');
noiseSuppression.setMuted(muted);
const sourceNode = audioContext.createMediaStreamSource(mediaStream);
sourceNode.connect(noiseSuppression).connect(destinationNode);

Hierarchy

Constructors

Methods

  • Terminates processing so that the node can be garbage-collected.

    Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    • event: Event

    Returns boolean

  • Sets the noise suppression mode:

    • In "suppress" mode, DNN noise suppression is used to automatically suppress background noise and remove noise from the audio signal.
    • In "gate" mode (the default), a traditional noise gate is used to suppress audio at levels below an adjustable threshold.

    Parameters

    • mode: "suppress" | "gate"

      The noise suppression mode.

    Returns void

  • Mutes or un-mutes the audio stream. While muted, the audio stream is maintained so that, for example, position Metadata continues to be sent.

    The audio stream is un-muted by default.

    Parameters

    • muted: boolean

      true to mute the audio, false to un-mute it.

    Returns void

  • Sets the noise threshold to use when the NoiseSuppression node is in "gate" mode. Audio below the threshold is suppressed.

    Parameters

    • value: number

      A negative value between -96 and 0 which indicates a minimum decibel level for the noise gate to stop suppressing audio. A value of -96 turns off the noise gate so that it does not suppress any audio.

    Returns void

© 2023 High Fidelity, Inc. | All rights reserved Terms of Service | Privacy Policy