Skip to main content

VAD

@auvious/media-tools / Exports / VAD

Class: VAD

Generic for input

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new VAD()

Properties

audioContext

Private audioContext: null | AudioContext = null


events

events: Events<IVadEventMap>


hark

Private hark: any = null


name

name: string = "auvious.vad"

distinct effect name

Implementation of

IMediaEffect.name


options

Private options: IVadOptions


speaking

Private speaking: boolean = false


streamIn

Private streamIn: null | MediaStream = null


volume

Private volume: number = 0

Methods

dispose

dispose(): void

Returns

void


onOutput

onOutput(callback): () => void

output is not transformative and can be ignored

Parameters

NameType
callback(stream: MediaStream) => void

Returns

fn

▸ (): void

Returns

void

Implementation of

IMediaEffect.onOutput


onUnload

onUnload(callback): () => void

listen for effect removal

Parameters

NameType
callback() => void

Returns

fn

▸ (): void

Returns

void

Implementation of

IMediaEffect.onUnload


pause

pause(): void

Returns

void


resume

resume(): void

Returns

void


setInput

setInput(stream): void

Parameters

NameType
streamMediaStream

Returns

void

Implementation of

IMediaEffect.setInput


setup

setup(options?): void

setup or update options (threshold, interval)

Parameters

NameType
optionsPartial<IVadOptions>

Returns

void