Picovoice WordmarkPicovoice Console
Introduction
Introduction
AndroidC.NETFlutterlink to GoiOSJavaNvidia JetsonLinuxmacOSNodejsPythonRaspberry PiReact NativeRustWebWindows
AndroidC.NETFlutterlink to GoiOSJavaNodejsPythonReact NativeRustWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutterlink to GoiOSJavaNodejsPythonReact NativeRustWeb
AndroidC.NETFlutterlink to GoiOSJavaNodejsPythonReact NativeRustWeb
FAQ
Introduction
AndroidCiOSLinuxmacOSPythonWebWindows
AndroidCiOSPythonWeb
SummaryOctopus Speech-to-IndexGoogle Speech-to-TextMozilla DeepSpeech
FAQ
Introduction
AndroidAngularArduinoBeagleBoneCChrome.NETEdgeFirefoxFlutterlink to GoiOSJavaNvidia JetsonLinuxmacOSMicrocontrollerNodejsPythonRaspberry PiReactReact NativeRustSafariUnityVueWebWindows
AndroidAngularC.NETFlutterlink to GoiOSJavaMicrocontrollerNodejsPythonReactReact NativeRustUnityVueWeb
SummaryPorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidAngularBeagleBoneCChrome.NETEdgeFirefoxFlutterlink to GoiOSJavaNvidia JetsonlinuxmacOSNodejsPythonRaspberry PiReactReact NativeRustSafariUnityVueWebWindows
AndroidAngularC.NETFlutterlink to GoiOSJavaNodejsPythonReactReact NativeRustUnityVueWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidBeagleboneCiOSNvidia JetsonLinuxmacOSPythonRaspberry PiRustWebWindows
AndroidCiOSPythonRustWeb
SummaryPicovoice CobraWebRTC VAD
FAQ
Introduction
AndroidAngularArduinoBeagleBoneC.NETFlutterlink to GoiOSJavaNvidia JetsonMicrocontrollerNodejsPythonRaspberry PiReactReact NativeRustUnityVueWeb
AndroidAngularCMicrocontroller.NETFlutterlink to GoiOSJavaNodejsPythonReactReact NativeRustUnityVueWeb
Picovoice SDK - FAQ
IntroductionSTM32F407G-DISC1 (Arm Cortex-M4)STM32F411E-DISCO (Arm Cortex-M4)STM32F769I-DISCO (Arm Cortex-M7)IMXRT1050-EVKB (Arm Cortex-M7)
FAQGlossary

Picovoice Platform — Vue API


API Reference for the Picovoice Vue SDK (npmjs).


PicovoiceVue

type PicovoiceVue = {
state: {
wakeWordDetection: PorcupineDetection | null;
inference: RhinoInference | null;
contextInfo: string | null;
isLoaded: boolean;
isListening: boolean;
error: string | null;
},
init: (
accessKey: string,
keyword: PorcupineKeyword,
porcupineModel: PorcupineModel,
context: RhinoContext,
rhinoModel: RhinoModel,
options?: PicovoiceOptions
) => Promise<void>;
start: () => Promise<void>;
stop: () => Promise<void>;
release: () => Promise<void>;
};

PicovoiceVue type.

  • state object : PicovoiceVue internal states.
    • wakeWordDetection PorcupineDetection | null : A state that is updated when the wake word has been detected.
    • inference RhinoInference | null : A state that is updated when an inference has been made.
    • contextInfo string | null : A state that updates when Rhino context info is available. Shows the list of intents, which expressions map to those intents, as well as slots and their possible values.
    • isLoaded boolean : A state indicating whether the engine is initialized successfully.
    • isListening boolean : A state indicating whether the webVoiceProcessor is passing audio to the engine.
    • error string | null : A string expression of the error.
  • init (...) => Promise<void> : A method to initialize the internal PicovoiceWorker. See init.
  • start () => Promise<void> : A method to start processing the audio. See start.
  • stop () => Promise<void> : A method to stop processing the audio. See stop.
  • release () => Promise<void> : Releases resources acquired by PicovoiceVue. See release

usePicovoice

usePicovoice(): PicovoiceVue { }

Vue reactive API for Picovoice SDK.

Returns

  • PicovoiceVue: States and functions for Picovoice Vue binding.

init()

async function init(
accessKey: string,
keyword: PorcupineKeyword,
porcupineModel: PorcupineModel,
context: RhinoContext,
rhinoModel: RhinoModel,
options: PicovoiceOptions = {}
): Promise<void>

Initializes the internal PicovoiceWorker. Sets state.isLoaded state to true if successful.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • keyword PorcupineKeyword : A Porcupine keyword. Can be provided as a built-in, base64 or a hosted .ppn file.
  • porcupineModel PorcupineModel : Contains the model parameters that are used to initialize the Porcupine engine. Model can be encoded in base64 or can be stored in a .pv file in a public directory.
  • context RhinoContext : A Rhino context. Can be provided as a base64 or a hosted .rhn file.
  • rhinoModel RhinoModel : Contains the model parameters that are used to initialize the Rhino engine. Model can be encoded in base64 or can be stored in a .pv file in a public directory.
  • options PicovoiceOptions : Optional configuration arguments.

start()

async function start(): Promise<void>

Starts audio recording and processing. If successful, state.isListening is set to true.


stop()

async function stop(): Promise<void>

Stops audio recording and processing. If successful, state.isListening is set to false.


release()

async function release(): Promise<void>

Releases resources acquired by the Picovoice and resets all internal states.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Picovoice Platform — Vue API
  • PicovoiceVue
  • usePicovoice
  • init()
  • start()
  • stop()
  • release()
Platform
  • Leopard Speech-to-Text
  • Cheetah Streaming Speech-to-Text
  • Octopus Speech-to-Index
  • Porcupine Wake Word
  • Rhino Speech-to-Intent
  • Cobra Voice Activity Detection
Resources
  • Docs
  • Console
  • Blog
  • Demos
Sales
  • Pricing
  • Starter Tier
  • Enterprise
Company
  • Careers
Follow Picovoice
  • LinkedIn
  • GitHub
  • Twitter
  • Medium
  • YouTube
  • AngelList
Subscribe to our newsletter
Terms of Use
Privacy Policy
© 2019-2022 Picovoice Inc.