none
Adding new words to the grammer RRS feed

  • Question

  • I have been looking at the ShapeGame Sample.  If I make the code changes below I would expect the recognizer to recognize "Up" and "Down" as two

    new words corresponding to the verbs CameraUp and CameraDown. When I test I find that the verbs which ship with the game are handled well , say "Stop" but

    the new verbs are not recognized at all and the speech recognizer is not ever close - 

    What is the issue and how can it be fixed - were the words cherry picked or do I need to somehow train the speech recognizer SDK

     

          public enum Verbs

            { ...

                Pause,

                CameraUp, // add a new verb

                CameraDown,  // add a new verb

                Resume

            };

     

            struct WhatSaid { ... }

     

            Dictionary<string, WhatSaid> GameplayPhrases = new Dictionary<string, WhatSaid>()

            {

                {"Up", new WhatSaid()         {verb=Verbs.CameraUp}}, // add a new word

                 {"Down", new WhatSaid()         {verb=Verbs.CameraDown}},  // add a new word

                 {"Faster", new WhatSaid()       {verb=Verbs.Faster}},

               ...

    Saturday, June 18, 2011 5:19 PM

Answers

  • I would expect the code you added above to work just fine. I just tried adding it myself and it worked for me. Try making the phrases to recognize being "Look Up" and "Look Down" and/or removing the commands "Speed Up" and "Slow Down". I'm guessing that the command "Up" could potentially be confused with "Speed Up" if you say something just before saying "Up".

    I'm not 100% sure, but hopefully some of this will help you out.
    Eddy


    I'm here to help
    Monday, June 20, 2011 10:19 PM

All replies

  • I have been looking at the ShapeGame Sample.  If I make the code changes below I would expect the recognizer to recognize "Up" and "Down" as two

    new words corresponding to the verbs CameraUp and CameraDown. When I test I find that the verbs which ship with the game are handled well , say "Stop" but

    the new verbs are not recognized at all and the speech recognizer is not ever close - 

    What is the issue and how can it be fixed - were the words cherry picked or do I need to somehow train the speech recognizer SDK

     

     

          public enum Verbs

            { ...

                Pause,

                CameraUp, // add a new verb

                CameraDown,  // add a new verb

                Resume

            };

     

            struct WhatSaid { ... }

     

            Dictionary<string, WhatSaid> GameplayPhrases = new Dictionary<string, WhatSaid>()

            {

                {"Up", new WhatSaid()         {verb=Verbs.CameraUp}}, // add a new word

                 {"Down", new WhatSaid()         {verb=Verbs.CameraDown}},  // add a new word

                 {"Faster", new WhatSaid()       {verb=Verbs.Faster}},

               ...

     

    Can you point me to a tutorial that explains more about adding verbs.  I'm wondering how after the sensor recognizes a word to get it to run a command or verb?  ANy direction would be appreciated.
    Sunday, June 19, 2011 12:45 AM
  • 1) I am finding that with time the words I add are regocnized better - I am not sure why but suspect that  the speech recognizer is learning my voice.

    2) Look at the code the SHapes Game - Basically you 

       1) Build a Grammer holding the new word

       2) Handle a recognized event to cause something to happen

    Sunday, June 19, 2011 3:56 PM
  • 1) I am finding that with time the words I add are regocnized better - I am not sure why but suspect that  the speech recognizer is learning my voice.

    2) Look at the code the SHapes Game - Basically you 

       1) Build a Grammer holding the new word

       2) Handle a recognized event to cause something to happen

    Thank you for pointing me in the right direction.  Would I view and try and merge certain elements from the Shape game to the Speech sample?  
    Sunday, June 19, 2011 6:48 PM
  • I would expect the code you added above to work just fine. I just tried adding it myself and it worked for me. Try making the phrases to recognize being "Look Up" and "Look Down" and/or removing the commands "Speed Up" and "Slow Down". I'm guessing that the command "Up" could potentially be confused with "Speed Up" if you say something just before saying "Up".

    I'm not 100% sure, but hopefully some of this will help you out.
    Eddy


    I'm here to help
    Monday, June 20, 2011 10:19 PM