Google Cloud Speech Recognition
* Method: Recognize
* Method: StartRecord
* Method: StopRecord
* Event: SpeechRecognizedSuccessEvent
* Event: SpeechRecognizedFailedEvent
2.1) SpeechRecognitionModule – implements ILowLevelSpeechRecognition
2.10.1) Enum: Language
3) 3rd Libraries:
3.1) Newtonsoft.Json (JsonDotNet)
How to use
First of All you need to add SpeechRecognitionModule prefab from FrostweepGames->GoogleCloudSpeechRecognition->Prefabs folder to your working scene.
Then you need to set your own API key of Google Cloud Speech Recognition into Custom Api Key field.
If you don’t have API Key, you can get it from https://cloud.google.com/speech/, https://cloud.google.com/speech/docs/common/auth#restrictions
Also you can change default Language on what you need, Enable Runtime Speech Detection,
Set runtime speech detection treshold, Enable profanity filter, Set count of alternatives for speech recognition result,
Set speech context phrases.
Record Length field uses for how long we record speech. Is Loop Recording field sets the loop of recording every Record Length seconds.
Then we need to create script with name Example and write base logic:
Where SpeechRecognizedSuccessEventHandler is the event handler of SpeechRecognizedSuccessEvent
and SpeechRecognizedFailedEventHandler is the event handler of SpeechRecognizedFailedEvent.
SpeechRecoginezedSuccessEvent will fire when speech recognition will returned response.
This event has a RecognitionResponse param type.
SpeechRecoginezedFailedEvent will fire when speech recognition failed. This event has a string param type.
You can handle response of Speech Recognition in SpeechRecognizedSuccessEventHandler
To get result of recognition you can use “RecognitionResponse->results->alternatives.transcript” path.
Where RecognitionResponse is instance of RecognitionResponse object.
For the start recording you can call this method:
For the stop recording you can call this method:
the start runtime speech detection and recording you can call this method:
For the stop runtime speech detection and recording you can call this method:
Example scene included to project:
 – Enable runtime speech detection and disable solitary speech recording
 – Count of alternative words range: 1 - 30
 – An array of phrases in context
• Example script included in unitypackage!
• Working with il2cpp and mono
• Supported all platforms*
• Plugin Support Unity3D 4 or above
* - Plugin doesn't support WebPlayer.
- On WebGL Unity engine doesn't support "Microphone" the class
- UPDATED Speech Recognition API to the latest Google Cloud Speech API
- implemented new features
- implemented speech detection treshold
- changed namespaces
- fixed bugs
- Changed Code Namespace with FrostweepGames.SpeechRecognition on FrostweepGames.SpeechRecognition.Google
- Implemented Runtime Speech Detection Utility