Unity Plugin Document
KeenASR is a beta release Unity plugin that encapsulates speech recognition functionality and provides simple-to-use C# interface via KeenASR class. Our speech recognition SDK, and consenquently the plugin, currently supports only the iOS platform.
Installing KeenASR Unity Plugin (tested in Unity 5.5.1)
Download the latest archive file for the plugin.
Unpack the archive in your Unity project root directory. You should end up with
Assets/Plugins/KeenASRdirectory in your project.
Make sure Unity is setup to build for iOS (editor version of the plugin provides only stubs)
As of plugin version 0.3 all settings in XCode that are related to KeenASR SDK are performed automatically via Assets/Plugins/KeenASR/Editor/PostBuildProcess.cs script. Please review and edit settings for microphone usage description in this file. Current version of the plugin also contains librispeech-nnet2-en-us ASR Bundle, which will be automatically added to the XCode project via PostBuildProcess.cs script; if you decide not to keep the bundle directory in the Assets/Plugins/KeenASR folder, please make sure correct path to the directory is specified in PostBuildProcess.cs file.
If you are using a custom ASR Bundle provided by Keen Research you can just modify the path in PostBuildProcess.cs to point to the correponding directory
If upgrading from previous plugin versions, we recommend you completely remove the old plugin (Assets/Plugins/KeenASR and Assets/Plugins/iOS directories) and then install the new version of the plugin. You will also need to make sure that SetLogLevel is called as class method; we recommend you set the log level before initializing the SDK.
NOTE: editor version of the plugin is not available (stub methods are available, so you will be able to compile but speech recognition will only work on iOS devices)
Adding Speech Recognition Functionality to Your App
Assets/Plugins/KeenASR/KeenASR.cs file, which provides high-level interface to the SDK. We highly recommend you review the documentation for the iOS framework to get familiar with the SDK high-level concepts. Unity plugin provides access to most of the functionality available in the iOS framework.
See sample code for using the plugin from within Unity.
Version 0.3, August 14th, 2017
Enhancement: added PostBuildProcess.cs script which automates XCode settings updates
Enhancement: added stub methods for the Editor build, so that you can compile editor version of your app (KeenASR SDK will not function, but you will be able to create builds)
Enhancement: reorganized structure of the plugin, so that everything related to KeenASR plugin is stored in
Enhancement: added default ASR Bundle in the plugin so that it does not need to be downloaded separately
Enhancement: changes SetLogLevel method to be a static method of KeenASR class. This allows you to set the log level before the framework is initialized
Bug fix: fixed issue with KeenASR class (and sharedInstance) persisting across multiple scenes