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 (13.0+)
Requirements
- Picovoice Account & AccessKey
- Unity 2021.3+
- 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
- Download and install Unity.
- Download and import the latest Porcupine Wake Word Unity package.
NOTE: For running Porcupine Wake Word 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:
Start audio capture and wake word detection with:
Stop with:
Release resources acquired by PorcupineManager
with:
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:
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 Wake Word GitHub repository.
Pass in the model file using the modelPath
input argument to change the detection language:
Demo
For the Porcupine Wake Word 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 Wake Word Unity package.
Usage
- Open the Porcupine Wake Word Demo Scene (
Porcupine/PorcupineDemo/PorcupineDemo.unity
). - Copy
AccessKey
from Picovoice Console into theACCESS_KEY
variable in PorcupineDemo.cs - Play the scene in the editor or go to
File > Build Settings
and click theBuild and Run
button to compile and run the scene for the selected platform.