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 — Angular API


API Reference for the Picovoice Angular SDK (npmjs).


PicovoiceService

class PicovoiceService implements OnDestroy { }

Angular service for Picovoice Platform.


PicovoiceService.init()

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

Initializes the PicovoiceService. Subscribe to the wakeWordDetection$ and inference$ subjects to receive events. If successful, isLoaded$ is set to true.

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.

PicovoiceService.start()

async start(): Promise<void>

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


PicovoiceService.stop()

async stop(): Promise<void>

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


PicovoiceService.release()

async release(): Promise<void>

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


PicovoiceService.wakeWordDetection$

wakeWordDetection$: Subject<PorcupineDetection>

Returns

  • Subject<PorcupineDetection> : Subject which is updated when the wake word is detected.

PicovoiceService.inference$

inference$: Subject<RhinoInference>

Returns

  • Subject<RhinoInference> : Subject which is updated when an inference has been made.

PicovoiceService.contextInfo$

contextInfo$: Subject<string | null>

Returns

  • Subject<string | null> : Subject which is updated Rhino context info is available. Shows the list of intents, which expressions map to those intents, as well as slots and their possible values.

PicovoiceService.isLoaded

isLoaded: Subject<boolean>

Returns

  • Subject<boolean> : Subject indicating whether the engine is initialized successfully.

PicovoiceService.isListening$

isListening$: Subject<boolean>

Returns

  • Subject<boolean> : Subject indicating whether the webVoiceProcessor is passing audio to the engine.

PicovoiceService.error$

error$: Subject<string | null>

Returns

  • Subject<string | null> : Subject indicating whether an error has occurred.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Picovoice Platform — Angular API
  • PicovoiceService
  • init()
  • start()
  • stop()
  • release()
  • wakeWordDetection$
  • inference$
  • contextInfo$
  • isLoaded
  • isListening$
  • error$
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.