Skip to main content

VAD Node

Detects voice activity from the level of the input. Voice is detected once the peak amplitude of the first channel stays above gainTriggerThreshold for triggerDuration, and stays active for hangoverDuration after it drops below.


Configuration​

This object does not provide any configuration options.


Properties​

Inherits properties from its parents, Node, SwitchboardObject.

gainTriggerThreshold​

Type: Float

Default: 0.2
Range: 0.0 to 1.0

Peak amplitude, on a linear 0 to 1 scale, above which a buffer counts as voice.

hangoverDuration​

Type: Float

Default: 1.2
Range: 0.0 to 5.0

Time in seconds voice activity stays active after the input drops below gainTriggerThreshold.

triggerDuration​

Type: Float

Default: 0.0
Range: 0.0 to 1.0

Time in seconds the input has to stay above gainTriggerThreshold before voice activity is detected. 0 detects voice on the first buffer above the threshold.


Actions​

Inherits actions from its parent, SwitchboardObject.

This object does not provide any additional actions.


Events​

end​

Emitted when voice activity ends, after hangoverDuration has passed without voice.

Data​

NameTypeDescription
endIntThe frame at which voice activity ended, counted the same way as start.
startIntThe frame at which the matching start event was emitted, counted from the first audio buffer the node received.

start​

Emitted when voice activity is detected, that is once the input has stayed above gainTriggerThreshold for triggerDuration. Carries no data.

Data​

None.