none
Skeleton tracking is slow / hanged? RRS feed

  • Question

  • Hi Eddy,

    I am using Synthesizer.Speak() [System.Speech.Synthesis namespace] method to announce different poses/pose status while continuously tracking the body. In this aspect, the tracking is too slow or sometimes hanged when announcing the messages. Please explain how to avoid this problem to get synchronization between the tracking and the message announcements?

    Thanks,

    Bharat.

    Tuesday, July 19, 2011 6:48 AM

Answers

  • Are you saying that the speech recognizer is recognizing commands from background noise, or from speech that isn't in your grammar?

    You should expect the recognizer to run all the time, and it will try to make sense of whatever the microphone picks up. When it does this, it will return a recognition result, but one indicating a low-confidence match. So you should try modifying your program to look at the quality of the recognition result, and ignore any result below some threshold. You'll have to determine the threshold by experimenting.

    • Marked as answer by ykbharat Friday, July 22, 2011 9:09 AM
    Thursday, July 21, 2011 6:00 PM

All replies

  • My guess is you're using the wrong function for playing that sound. Generally you have two options. One is to just queue an IO operation and continue on, the other is to wait for the IO operation to complete before continuing on. If you play a sound that runs for 30s and wait for it to complete then your application locks up for 30s. The GUI stops responding, you stop processing frames off the Kinect, ect. You need to continue on as the sound plays. If you're going to wait for the sound to complete, your logic depends upon it completing before continuing, then you need to put that into a seperate thread so the GUI itself is not waiting, just that thread.

    Tuesday, July 19, 2011 6:58 PM
  • Bharat,

    Robert answered a similar question on a different forum (http://social.msdn.microsoft.com/Forums/en-US/kinectsdkaudioapi/thread/4ec65260-eae9-4cfa-ba72-77c9aa2fa756) does this help you, or do you still don't understand problem?

    Eddy


    I'm here to help
    Wednesday, July 20, 2011 10:28 PM
  • Eddy,

    Regarding synchronization, I understood to run tracking and synthesizer in separate threads.

    Please correct me if I am wrong.

    Any code samples may help me as I am not good at threading.

    But with speech recognition I implemented xml file for grammar based on SRGS and semantics. Even though the user doesn't speaks the kinect hypothesizes some words from the grammar file, recognizes, raises speech_recognizer event and interrupts the flow of application.

    Please give any specific solutions to implement and avoid this.


    Thanks for the concern

    Bharat

    Thursday, July 21, 2011 2:18 PM
  • Are you saying that the speech recognizer is recognizing commands from background noise, or from speech that isn't in your grammar?

    You should expect the recognizer to run all the time, and it will try to make sense of whatever the microphone picks up. When it does this, it will return a recognition result, but one indicating a low-confidence match. So you should try modifying your program to look at the quality of the recognition result, and ignore any result below some threshold. You'll have to determine the threshold by experimenting.

    • Marked as answer by ykbharat Friday, July 22, 2011 9:09 AM
    Thursday, July 21, 2011 6:00 PM
  • Hi Robert,

    Thanks for the reply.

    I observed kinect recognizes/works perfect using threshold(e.result.confidence) in silent enviroment when no other background voices/sounds are not there.

    Thanks,

    Bharat

    Friday, July 22, 2011 9:05 AM