Skip to main content

Class: VoiceGate

Decides, one captured frame at a time, whether the microphone is sending. Pure: it is told the frame's level and the time, and keeps no clock.

Constructors​

constructor​

• new VoiceGate(options?): VoiceGate

Parameters​

NameType
optionsPartial<VoiceGateOptions>

Returns​

VoiceGate

Properties​

isForcedOpen​

• isForcedOpen: boolean = false

Open whatever the level or the key says (the microphone test).


isKeyHeld​

• isKeyHeld: boolean = false

Whether the talk key is down (push-to-talk).


isMuted​

• isMuted: boolean = false

A closed switch in front of everything: nothing passes while muted.


options​

• options: VoiceGateOptions

Accessors​

isSending​

• get isSending(): boolean

Returns​

boolean

Methods​

reset​

▸ reset(): void

Close at once, forgetting any tail still running.

Returns​

void


step​

▸ step(level, nowMs): VoiceGateStep

Take one frame's level (0..1) captured at nowMs.

Parameters​

NameType
levelnumber
nowMsnumber

Returns​

VoiceGateStep