none
Recognizing keyboard commands RRS feed

  • Question

  • Hello would like to promote the potential of kinect at my university here in the Amazon, I would do the same demosntração a Coordinator for the course of my control engineering and automation.
    So I wonder if you could help me on how I podeia change the voice recognition program of colors that comes with the SDK in C # to kinect when I say a letter or any word he or she presses a letter or a keyboard character
    would be grateful if you could help me with this
    I'm kind of new in visual studio so if you can answer me in the form of written program would be better
    Thank you for your attention
    Monday, July 18, 2011 5:30 AM

Answers

  • Did you try adding the right assembly to your project (System.Windows.Forms.dll) and then importing namespace into your class file:

    using System.Windows.Forms;

    at top of .cs file where you define your class?

    Eddy


    I'm here to help
    Tuesday, July 26, 2011 7:23 PM
  • Sorry for my delay, Jefferson Junio,

    I'm not an expert in all the ways that you can send commands to other applications, since that is not the focus of this forum, but maybe the SendKeys.Send method could help you: http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send(v=VS.100).aspx

    Also, a couple of years ago when doing native application development I would typically use keybd_event function to simulate hardware keystrokes. You can pinvoke it from C# as shown in this link: http://pinvoke.net/default.aspx/user32.keybd_event

    Hopefully this helps you out, and sorry again for the delay. If the above methods don't work for you, or you need more details about sending keystrokes to applications, you should try a different forum, since I won't be able to provide you much support there.
    Eddy


    I'm here to help
    Wednesday, July 20, 2011 9:59 PM

All replies

  • Kinect for Windows SDK uses the Microsoft Speech API (SAPI) to do voice recognition. You can find more information about using SAPI here: http://msdn.microsoft.com/en-us/library/ms723627(VS.85).aspx (Sorry, that's the link to the English documentation. I tried looking at the Portuguese docs, but it keeps showing me English. I don't know if this is because the documents aren't translated, or because my browser is set for English...)

    Basically, you would change the recognition grammar created in the sample to a list of words you are interested in.

    Monday, July 18, 2011 5:48 PM
  • Jefferson,

    Just to be clear on what you need, you want an application that has:

    Input: Voice commands
    Output: Keyboard characters

    Is that right? If so, are you asking for more help of how to recognize voice command input, or for how to do the keyboard characters as output?

    If you're asking for help with recognizing voice command input, could you let me know what is confusing about ShapeGame sample where you still need more information?
    If you're asking about sending keyboard characters as output, are you trying to send keyboard characters to the same application that is doing voice recognition, or to a different application?

    If you answer these questions, I'll try to help you more.
    Eddy


    I'm here to help
    Monday, July 18, 2011 6:50 PM
  • I'm trying to do is input: and output commands: keyboard characters.
    for example say a word and it is written in Microsoft Word or speak a word like "next" and Microsoft Power Point slide switch to the next

    I'm able to add words in the grammar of recognition, but do not know how to use these words for my departure is a keyboard character

    I am trying to adapt the example of "Speech Color" that came along as an example in the SDK, but I can not
    If you can help me I would be very grateful

    FYI: Jefferson Junio
    Monday, July 18, 2011 10:43 PM
  • Sorry for the delay answering the questions you wanted to know but I was in college.
    I am waiting for your help
    carefully: Jefferson Junio
    Tuesday, July 19, 2011 2:01 PM
  • Sorry for my delay, Jefferson Junio,

    I'm not an expert in all the ways that you can send commands to other applications, since that is not the focus of this forum, but maybe the SendKeys.Send method could help you: http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send(v=VS.100).aspx

    Also, a couple of years ago when doing native application development I would typically use keybd_event function to simulate hardware keystrokes. You can pinvoke it from C# as shown in this link: http://pinvoke.net/default.aspx/user32.keybd_event

    Hopefully this helps you out, and sorry again for the delay. If the above methods don't work for you, or you need more details about sending keystrokes to applications, you should try a different forum, since I won't be able to provide you much support there.
    Eddy


    I'm here to help
    Wednesday, July 20, 2011 9:59 PM
  • Thank you for your help.
    What I'm trying to do is the following. I've carried my grammar of words.

    And then I'm trying this is for example

    static void SreSpeechRecognized(object sender, SpeechRecognizedEventArgs e)
    {
      if (e.Result.Text == "next")
       {
      SendKeys.Send("{LEFT}");

       }

    }

    But the following error appears "The name 'SendKeys' does not exist in current context" 
    you could help me solve this

    Thank you for your attention

    Tuesday, July 26, 2011 2:47 PM
  • Did you try adding the right assembly to your project (System.Windows.Forms.dll) and then importing namespace into your class file:

    using System.Windows.Forms;

    at top of .cs file where you define your class?

    Eddy


    I'm here to help
    Tuesday, July 26, 2011 7:23 PM
  • THANK YOU IT WAS EXACTLY WHAT I WAS WANTING TO DO
    Thursday, July 28, 2011 6:09 PM