angularPicovoice - Angular Web Quick Start

  • Wake Word Detection
  • Offline Hotword Detection
  • Local Voice Commands
  • Always Listening
  • Voice Activation
  • NLU
  • Follow-on command


  • yarn (or npm)
  • Secure browser context (i.e. HTTPS or localhost)


  • Chrome, Edge
  • Firefox
  • Safari

Install the NPM packages

Using Picovoice with Angular requires installing three packages: the binding package, @picovoice/picovoice-web-angular, the language-specific web worker package (e.g. @picovoice/picovoice-web-en-worker), and @picovoice/web-voice-processor.

Use yarn or npm to install the packages to your project:

yarn add @picovoice/picovoice-web-angular @picovoice/picovoice-web-en-worker @picovoice/web-voice-processor


npm install @picovoice/picovoice-web-angular @picovoice/picovoice-web-en-worker @picovoice/web-voice-processor

Demo application

There is a Angular demo project available on the Picovoice GitHub repository. The demo project was bootstrapped with Angular CLI.

Clone Picovoice GitHub repository

If using SSH, clone the Picovoice repository with:

git clone --recurse-submodules [email protected]:Picovoice/picovoice.git

If using HTTPS, then type:

git clone --recurse-submodules

Install dependencies and run

Use yarn or npm to install the demo dependencies and start it:

yarn serve


npm install
npm run serve

Open http://localhost:4200 to view it in the browser.

Try Picovoice SDK

Say the wake word "Picovoice", followed by a phrase in the "Alarm Clock" context, e.g.:

"Picovoice, Set a timer for ten seconds"

Rhino's inference result will appear:

"isFinalized": true,
"isUnderstood": true,
"intent": "setTimer",
"slots": { "minutes": "1" }

The engine will reset to Porcupine, and it will once again be listening for the wake phrase "Picovoice". Try another interaction, and this time use a phrase outside of the Rhino context:

"Picovoice, tell me a joke"

{ "isFinalized": true, "isUnderstood": false, "intent": null, "slots": {} }

Clock context YAML source

- "set (a, an, the) [alarm, timer] for $pv.TwoDigitInteger:hours [hour, hours] (and) $pv.TwoDigitInteger:minutes [minute, minutes] (and) $pv.TwoDigitInteger:seconds [second, seconds]"
- "set (a, an, the) [alarm, timer] for $pv.TwoDigitInteger:hours [hour, hours] (and) $pv.TwoDigitInteger:minutes [minute, minutes]"
- "set (a, an, the) [alarm, timer] for $pv.TwoDigitInteger:hours [hour, hours] (and) $pv.TwoDigitInteger:seconds [second, seconds]"
- "set (a, an, the) [alarm, timer] for $pv.TwoDigitInteger:hours [hour, hours]"
- "set (a, an, the) [alarm, timer] for $pv.TwoDigitInteger:minutes [minute, minutes] (and) $pv.TwoDigitInteger:seconds [second, seconds]"
- "set (a, an, the) [alarm, timer] for $pv.TwoDigitInteger:minutes [minute, minutes]"
- "set (a, an, the) [alarm, timer] for $pv.TwoDigitInteger:seconds [second, seconds]"
- "$pv.TwoDigitInteger:hours [hour, hours] (and) $pv.TwoDigitInteger:minutes [minute, minutes] (and) $pv.TwoDigitInteger:seconds [second, seconds]"
- "$pv.TwoDigitInteger:hours [hour, hours] (and) $pv.TwoDigitInteger:minutes [minute, minutes]"
- "$pv.TwoDigitInteger:hours [hour, hours] (and) $pv.TwoDigitInteger:seconds [second, seconds]"
- "$pv.TwoDigitInteger:hours [hour, hours]"
- "$pv.TwoDigitInteger:minutes [minute, minutes] (and) $pv.TwoDigitInteger:seconds [second, seconds]"
- "$pv.TwoDigitInteger:minutes [minute, minutes]"
- "$pv.TwoDigitInteger:seconds [second, seconds]"
- "reset (the) (timer)"
- "[pause, stop] (the) (timer)"
- "resume (the) (timer)"

Issue with this doc? Please let us know.