Description
Shai, Friend of the Kinect Gallery, is back, this time with a great introduction/getting started guide for using Kinect Speech recognition capabilities. He takes you from download (which is not as simple as you might can be confusing) to wiring everything up in code.
Kinect Speech Recognition – Introduction
Its been a while since I wrote about Kinect, I have to say I really miss it because Kinect is really cool device and there is a lot can be done with it.
Because I’ve talked a lot on the Kinect Nui its time to talk about Kinect Speech Recognition
...
Prerequisites
Before you can start with Kinect Speech Recognition you need to install the following:
* Even if you’re working with 64bit OS you need to download the 86x versions because Kinect Runtime works only with 86x. *
- Microsoft Speech Platform - Software Development Kit (SDK) (Version 10.2)
- Microsoft Speech Platform - Server Runtime (Version 10.2)
- Kinect for Windows Runtime Language Pack
- Step 1: Add References and Using
- Step 2: Get Installed Recognizers
- Step 3: Register SpeechRecognitionEngine & Build Words Grammar
- Step 4: Connect Kinect Audio Input To Speech Recognition Engine
Project Information URL: http://blogs.microsoft.co.il/blogs/shair/archive/2011/10/26/kinect-speech-recognition-introduction.aspx
Project Download URL: http://blogs.microsoft.co.il/files/folders/918644/download.aspx
Project Source URL: http://blogs.microsoft.co.il/files/folders/918644/download.aspx
void BuildSpeechEngine(RecognizerInfo rec)
{
_speechEngine = new SpeechRecognitionEngine(rec.Id);
var choices = new Choices();
choices.Add("word");
choices.Add("calculator");
choices.Add("my computer");
choices.Add("mspaint");
choices.Add("close");
var gb = new GrammarBuilder { Culture = rec.Culture };
gb.Append(choices);
var g = new Grammar(gb);
_speechEngine.LoadGrammar(g);
//recognized a word or words that may be a component of multiple
//complete phrases in a grammar.
_speechEngine.SpeechHypothesized += new EventHandler
<SpeechHypothesizedEventArgs>(SpeechEngineSpeechHypothesized);
//receives input that matches any of its loaded and enabled Grammar
//objects.
_speechEngine.SpeechRecognized += new EventHandler
<SpeechRecognizedEventArgs>(_speechEngineSpeechRecognized);
//receives input that does not match any of its loaded and enabled
//Grammar objects.
_speechEngine.SpeechRecognitionRejected += new EventHandler
<SpeechRecognitionRejectedEventArgs>
(_speechEngineSpeechRecognitionRejected);
//C# threads are MTA by default and calling RecognizeAsync in the same
//thread will cause an COM exception.
var t = new Thread(StartAudioStream);
t.Start();
}
Contact Information:
- Blog: http://blogs.microsoft.co.il/blogs/shair
- Twitter: @shai_rai