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 GoiOSJavaNvidia JetsonLinuxmacOSNodejsPythonRaspberry PiReact NativeRustWebWindows
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
AndroidCiOSNVIDIA JetsonLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice KoalaMozilla RNNoise
Introduction
AndroidCiOSNVIDIA JetsonLinuxmacOSPythonRaspberry PiWebWindows
AndroidCPythoniOSWeb
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

Porcupine Wake Word
Unity Quick Start


Platforms

  • Linux (x86_64)
  • macOS (x86_64, arm64)
  • Windows (x86_64)
  • Android (5.0+, API 21+) (ARM only)
  • iOS (11.0+)

Requirements

  • Picovoice Account & AccessKey
  • Unity 2017.4+ (Unity 2021.2+ for macOS arm64)
  • Unity Build Support modules for desired platforms

Picovoice Account & AccessKey

Signup or Login to Picovoice Console to get your AccessKey. Make sure to keep your AccessKey secret.

Quick Start

Setup

  1. Download and install Unity .
  2. Download and import the latest Porcupine Unity package .

NOTE: For running Porcupine on macOS arm64, use the porcupine-*-Apple-silicon.unitypackage version with Unity 2021.2+.

Usage

Create an instance of PorcupineManager that detects the included built-in wake words porcupine and bumblebee using the FromBuiltInKeywords constructor:

using Pv.Unity;
void wakeWordCallback(int keywordIndex)
{
if(keywordIndex == 0)
{
// `porcupine` detected
}
else if (keywordIndex == 1)
{
// `bumblebee` detected
}
}
PorcupineManager porcupineManager = PorcupineManager.FromBuiltInKeywords(
"${ACCESS_KEY}",
new List<Porucpine.BuiltInKeyword>
{
Porcupine.BuiltInKeyword.PORCUPINE,
Porcupine.BuiltInKeyword.BUMBLEBEE
},
wakeWordCallback);

Start audio capture and wake word detection with:

porcupineManager.Start();

Stop with:

porcupineManager.Stop();

Release resources acquired by PorcupineManager with:

porcupineManager.Delete();
For use-cases where an audio capture pipeline is not required, there's the Low-Level Porcupine API .

Custom Keywords

Create custom keywords using the Picovoice Console . Download the custom wake word file (.ppn) and create an instance of PorcupineManager using the FromKeywordPaths constructor:

PorcupineManager porcupineManager = PorcupineManager.FromKeywordPaths(
"${ACCESS_KEY}",
new List<string> {"${KEYWORD_FILE_PATH}"});

Non-English Languages

Use the corresponding model file (.pv), to detect non-English wake words. The model files for all supported languages are available on the Porcupine GitHub repository .

Pass in the model file using the modelPath input argument to change the detection language:

PorcupineManager porcupineManager = PorcupineManager.FromKeywordPaths(
"${ACCESS_KEY}",
new List<string> {"${KEYWORD_FILE_PATH}"},
modelPath: "${MODEL_FILE_PATH}");

Demo

For the Porcupine Unity SDK, we offer demo applications that demonstrate how to use the Wake Word engine on real-time audio streams (i.e. microphone input).

Setup

Download and import the latest Porcupine Unity package .

Usage

  1. Open the Porcupine Demo Scene (Porcupine/PorcupineDemo/PorcupineDemo.unity).
  2. Copy AccessKey from Picovoice Console into the ACCESS_KEY variable in PorcupineDemo.cs
  3. Play the scene in the editor or go to File > Build Settings and click the Build and Run button to compile and run the scene for the selected platform.

Resources

Package

  • Pv.Unity.Porcupine on GitHub

API

  • Pv.Unity.Porcupine API Docs

GitHub

  • Porcupine Unity SDK on GitHub
  • Porcupine Unity demos on GitHub

Benchmark

  • Wake Word Benchmark

Further Reading

  • Tutorial: Making a Hands-Free Video Player in Unity

Video

  • Voice-Controlled VR Video Player Made in Unity

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Porcupine Wake Word Unity Quick Start
  • Platforms
  • Requirements
  • Picovoice Account & AccessKey
  • Quick Start
  • Setup
  • Usage
  • Custom Keywords
  • Non-English Languages
  • Demo
  • Setup
  • Usage
  • Resources
Platform
  • Leopard Speech-to-Text
  • Cheetah Streaming Speech-to-Text
  • Koala Noise Suppression
  • Eagle Speaker Recognition
  • Octopus Speech-to-Index
  • Porcupine Wake Word
  • Rhino Speech-to-Intent
  • Cobra Voice Activity Detection
Resources
  • Docs
  • Console
  • Blog
  • Demos
Sales
  • Pricing
  • Enterprise Support Add-on
  • Developer
  • Enterprise
Company
  • Careers
Follow Picovoice
  • LinkedIn
  • GitHub
  • Twitter
  • Medium
  • YouTube
  • AngelList
Subscribe to our newsletter
Terms of Use
Privacy Policy
© 2019-2022 Picovoice Inc.