Porcupine Wake Word
Angular API
API Reference for the Porcupine Angular SDK (npmjs).
PorcupineService
Angular service for Porcupine
wake word engine.
PorcupineService.init()
Initializes the PorcupineService. Subscribe to keywordDetection$
subject to receive keyword detection events. If loaded, isLoaded$
is set to true
.
Parameters
accessKey
string : AccessKey obtained from Picovoice Console.keywords
Array<PorcupineKeyword | BuiltInKeyword> | PorcupineKeyword | BuiltInKeyword : Built-in or Base64 representations of keywords and their sensitivities. Can be provided as an array or a single keyword.model
PorcupineModel : Porcupine model options.
PorcupineService.start()
Starts keyword detection via WebVoiceProcessor
.
If started, isListening$
is set to true
.
PorcupineService.stop()
Stops keyword detection. If stopped, isListening$
is set to false
.
PorcupineService.release()
Releases resources acquired by the PorcupineService
and resets all internal states.
PorcupineService.keywordDetection$
Subject which is updated when a keyword is detected.
PorcupineService.isLoaded$
Subject indicating whether PorcupineService
has loaded.
PorcupineService.isListening$
Subject indicating whether the WebVoiceProcessor
is passing audio to the engine.
PorcupineService.error$
Subject which contains the error object when an error has occurred.