Porcupine Wake Word
Vue API
API Reference for the Porcupine Vue SDK (npmjs).
PorcupineVue
PorcupineVue
type.
state
object :PorcupineVue
internal states.keywordDetection
PorcupineDetection | null : A state containing keyword result value.isLoaded
boolean : A state indicating whether the engine is initialized successfully.isListening
boolean : A state indicating whether thewebVoiceProcessor
is passing audio to the engine.error
string | null : A string expression of the error.
init
(...) => Promise<void> : A method to initializePorcupine
given the arguments. Seeinit
.start
() => Promise<void> : A method to start processing the audio. Seestart
.stop
() => Promise<void> : A method to stop processing the audio.stop
.release
() => Promise<void> : Releases resources acquired byPorcupineVue
. Seerelease
.
usePorcupine()
Vue reactive API for Porcupine
wake word engine.
Returns
PorcupineVue
: States and functions forPorcupine
Vue binding.
init()
Initializes PorcupineVue
. Sets state.isLoaded
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.
start()
Starts keyword detection.
If started, state.isListening
is set to true
.
stop()
Stops keyword detection. Sets state.isListening
to false
.
release()
Releases resources acquired by the PorcupineVue
and resets all internal states.