VAD

View as Markdown

Methods

addEventListener

Adds a handler for the specified Silero.VADEvents event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called.

1addEventListener(event: Silero.VADEvents | T, callback: (event: Silero._VADEvents[T]) => any): void

Parameters

event
Silero.VADEvents | TRequired
callback
(event: Silero._VADEvents[T]) => anyRequired

close

Closes the VAD connection (over WebSocket) or connection attempt.

1close(): void

id

Returns the VAD id.

1id(): string

removeEventListener

Removes a handler for the specified Silero.VADEvents event.

1removeEventListener(event: Silero.VADEvents | T, callback?: (event: Silero._VADEvents[T]) => any): void

Parameters

event
Silero.VADEvents | TRequired
callback
(event: Silero._VADEvents[T]) => any

reset

Reset the VAD context.

1reset(): void

webSocketId

Returns the VAD WebSocket id.

1webSocketId(): string