Hello!!!

We asked for it, and now we finally have weekly builds for the new Kinect V2 SDK. Now the interesting thing is that we have tons of interesting work in each release to review what you have inside. So today, a small review of something that already exists in Kinect SDK V1.8 and needed in V2: Speech Recognition.

The basis is simple and safe that you know, create a dictionary with words within the same. The interesting thing is that we make the Association of the audio feed of Kinect with the speech grammar defined in line 5 in line 18


private void WindowLoaded(object sender, RoutedEventArgs e)
{
kinectSensor = KinectSensor.GetDefault();
kinectSensor.Open();
var audioBeamList = kinectSensor.AudioSource.AudioBeams;
var audioStream = audioBeamList[0].OpenInputStream();
convertStream = new KinectAudioStream(audioStream);
Var ri = GetKinectRecognizer();
recognitionSpans = new List<Span> { forwardSpan, backSpan, rightSpan, leftSpan };
speechEngine = new SpeechRecognitionEngine(ri.Id);
// Create a grammar definition …
speechEngine.SpeechRecognized += SpeechRecognized;
speechEngine.SpeechRecognitionRejected += SpeechRejected;
convertStream.SpeechActive = true;
speechEngine.SetInputToAudioStream(
convertStream, new SpeechAudioFormatInfo(EncodingFormat.Pcm, 16000, 16, 1, 32000, 2, null));
speechEngine.RecognizeAsync(RecognizeMode.Multiple);
}
private static RecognizerInfo GetKinectRecognizer()
{
foreach (RecognizerInfo recognizer in SpeechRecognitionEngine.InstalledRecognizers())
{
string value;
recognizer.AdditionalInfo.TryGetValue("Kinect", out value);
if ("True".Equals(value, StringComparison.OrdinalIgnoreCase) && "en-US".Equals(recognizer.Culture.Name, StringComparison.OrdinalIgnoreCase))
{
return recognizer;
}
}
return null;
}

Another important point is the section for the KinectRecognizer at the end. To see if when I arrive to Madrid I make a cool video 😀

And as always, the disclaimer

“This is preliminary software and/or hardware and APIs are preliminary and subject to change”

Greetings @AVE

El Bruno

4 responses to “[#KINECTSDK] Speech recognition now available in SDK V2!”

  1. I was trying the Speech recognition app with Kinect V2. For some reason RecognizerInfo is returning null value. I have installed the Speech Runtime and Speech SDK. Not sure why it is returning null. Any inputs to check for?

    Like

    1. Hi Vivek

      just to check, do you have all the prerequisites availables to use the Kinect V2? USB3 in example

      Regards

      Like

      1. Hi Bruno,
        Thanks for the reply.

        Yes, Kinect V2 is working fine . I am having an problem with Audio. I am working on windows 10 machine, I did download the Microsoft Speech SDK and noticed in System requirements windows 10 is not included as supported operating system.
        https://www.microsoft.com/en-us/download/details.aspx?id=27226

        It is the same with Speech runtime too Microsoft Speech Platform – Runtime (Version 11)

        So was not sure if the problem is on Windows 10 operating system.

        Like

  2. i am having the same problem i installed everything but i am using windows 10 the applications starts but cant recognize the voice so its only displaying the white one which is the default. Do we know any solution to this problem /

    Like

Leave a comment

Discover more from El Bruno

Subscribe now to keep reading and get access to the full archive.

Continue reading