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
| Name | Type |
|---|---|
options | Partial<VoiceGateOptions> |
Returns
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
| Name | Type |
|---|---|
level | number |
nowMs | number |