This article serves as a comprehensive guide for adding on-device Speech Recognition
to an Unity project.
When used casually, Speech Recognition
usually refers solely to Speech-to-Text
. However, Speech-to-Text
represents only a single facet of Speech Recognition
technologies. It also refers to features such as Wake Word Detection
, Voice Command Recognition
, and Voice Activity Detection
(VAD
). In the context of Unity projects, Speech Recognition
can be used to implement a Voice Interface
.
Fortunately Picovoice offers a few tools to help implement Voice Interfaces
. If all that is needed is to recognize when specific phrases or words are said, use Porcupine Wake Word. If Voice Commands
need to be understood and intent extracted with details (i.e. slot values), Rhino Speech-to-Intent is more suitable. Keep reading to see how to quickly start with both of them.
Picovoice Unity SDKs have cross-platform support for Linux
, macOS
, Windows
, Android
and iOS
!
Porcupine Wake Word
To integrate the
Porcupine Wake Word
SDK into your Unity project, download and import the latest Porcupine Unity package.Sign up for a free Picovoice Console account and obtain your
AccessKey
. TheAccessKey
is only required for authentication and authorization.Create a custom wake word model using Picovoice Console.
Download the
.ppn
model file and copy it into your project'sStreamingAssets
folder.Write a callback that takes action when a keyword is detected:
- Initialize the
Porcupine Wake Word
engine with the callback and the.ppn
file name (or path relative to theStreamingAssets
folder):
- Start detecting:
For further details, visit the Porcupine Wake Word
product page or refer to Porcupine's Unity SDK quick start guide.
Rhino Speech-to-Intent
To integrate the
Rhino Speech-to-Intent
SDK into your Unity project, download and import the latest Rhino Unity package.Sign up for a free Picovoice Console account and obtain your
AccessKey
. TheAccessKey
is only required for authentication and authorization.Create a custom context model using Picovoice Console.
Download the
.rhn
model file and copy it into your project'sStreamingAssets
folder.Write a callback that takes action when a user's intent is inferred:
- Initialize the
Rhino Speech-to-Intent
engine with the callback and the.rhn
file name (or path relative to theStreamingAssets
folder):
- Start inferring:
For further details, visit the Rhino Speech-to-Intent product page or refer to Rhino's Android SDK quick start guide.