Android Speech Recognizer Plugin
A Unity plug-in that enhances control over Android speech recognition.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SpeechRecognizerManager Class Reference

Unity Speech Recognizer manager. More...

Public Member Functions

 SpeechRecognizerManager (string gameObjectName)
 
void StartListening (int maxResults=5, string language=null)
 Starts the listening. More...
 
void StopListening ()
 Stops listening for speech. Speech captured so far will be recognized as if the user had stopped speaking at this point. More...
 
void CancelListening ()
 Cancels the speech recognition. More...
 
void Release ()
 Releases the object. More...
 

Static Public Member Functions

static bool IsAvailable ()
 Checks whether a speech recognition service is available on the system. More...
 

Public Attributes

const string RESULT_SEPARATOR = "/::/"
 
const int EVENT_SPEECH_READY = -1
 
const int EVENT_SPEECH_BEGINNING = -2
 
const int EVENT_SPEECH_END = -3
 
const int ERROR_NOT_INITIALIZED = -1
 
const int ERROR_AUDIO = 3
 
const int ERROR_CLIENT = 5
 
const int ERROR_INSUFFICIENT_PERMISSIONS = 9
 
const int ERROR_NETWORK = 2
 
const int ERROR_NETWORK_TIMEOUT = 1
 
const int ERROR_NO_MATCH = 7
 
const int ERROR_RECOGNIZER_BUSY = 8
 
const int ERROR_SERVER = 4
 
const int ERROR_SPEECH_TIMEOUT = 6
 

Detailed Description

Unity Speech Recognizer manager.

Constructor & Destructor Documentation

SpeechRecognizerManager.SpeechRecognizerManager ( string  gameObjectName)

Member Function Documentation

void SpeechRecognizerManager.CancelListening ( )

Cancels the speech recognition.

static bool SpeechRecognizerManager.IsAvailable ( )
static

Checks whether a speech recognition service is available on the system.

Returns
true if is available; otherwise, false.
void SpeechRecognizerManager.Release ( )

Releases the object.

void SpeechRecognizerManager.StartListening ( int  maxResults = 5,
string  language = null 
)

Starts the listening.

Parameters
maxResultsMax results (optional, default=5).
languagePreferred language (optional, default=null for default language).
void SpeechRecognizerManager.StopListening ( )

Stops listening for speech. Speech captured so far will be recognized as if the user had stopped speaking at this point.

Member Data Documentation

const int SpeechRecognizerManager.ERROR_AUDIO = 3
const int SpeechRecognizerManager.ERROR_CLIENT = 5
const int SpeechRecognizerManager.ERROR_INSUFFICIENT_PERMISSIONS = 9
const int SpeechRecognizerManager.ERROR_NETWORK = 2
const int SpeechRecognizerManager.ERROR_NETWORK_TIMEOUT = 1
const int SpeechRecognizerManager.ERROR_NO_MATCH = 7
const int SpeechRecognizerManager.ERROR_NOT_INITIALIZED = -1
const int SpeechRecognizerManager.ERROR_RECOGNIZER_BUSY = 8
const int SpeechRecognizerManager.ERROR_SERVER = 4
const int SpeechRecognizerManager.ERROR_SPEECH_TIMEOUT = 6
const int SpeechRecognizerManager.EVENT_SPEECH_BEGINNING = -2
const int SpeechRecognizerManager.EVENT_SPEECH_END = -3
const int SpeechRecognizerManager.EVENT_SPEECH_READY = -1
const string SpeechRecognizerManager.RESULT_SEPARATOR = "/::/"

The documentation for this class was generated from the following file: