API
Keyword Spotter

undefined

Class: KeywordSpotter

Defined in: voiceController.ts:67

Implements voice control using basic keyword spotting.

Keyword spotting is most useful in cases where we need to match EXACT user command phrases to actions with no ambiguity, e.g., matching the exact words “scroll up” to a scroll up action.

Extends

Constructors

new KeywordSpotter()

new KeywordSpotter(commandHandlers, callbacks): KeywordSpotter

Defined in: voiceController.ts:24

Parameters

Parameter Type
commandHandlers CommandHandlers
callbacks Partial<TranscriberCallbacks>

Returns

KeywordSpotter

Inherited from

VoiceController.constructor

Properties

Property Type Inherited from Defined in
commandHandlers CommandHandlers VoiceController.commandHandlers voiceController.ts:13
onModelLoaded () => any VoiceController.onModelLoaded voiceController.ts:16
onModelLoadStarted () => any VoiceController.onModelLoadStarted voiceController.ts:15
onSpeechEnd () => any VoiceController.onSpeechEnd voiceController.ts:22
onSpeechStart () => any VoiceController.onSpeechStart voiceController.ts:21
onTranscribeStarted () => any VoiceController.onTranscribeStarted voiceController.ts:17
onTranscribeStopped () => any VoiceController.onTranscribeStopped voiceController.ts:18
onTranscriptionCommitted (text: string) => any VoiceController.onTranscriptionCommitted voiceController.ts:19

Methods

onTranscriptionUpdated()

onTranscriptionUpdated(text): void

Defined in: voiceController.ts:68

Parameters

Parameter Type
text string

Returns

void

Overrides

VoiceController.onTranscriptionUpdated

normalizeText()

static normalizeText(text): string

Defined in: voiceController.ts:56

Parameters

Parameter Type
text string

Returns

string

Inherited from

VoiceController.normalizeText