Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7616941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:00:54+00:00 2026-05-31T03:00:54+00:00

I am writing a little application that is supposed to listen for user commands

  • 0

I am writing a little application that is supposed to listen for user commands and send keystrokes to another program. I am using Speech Recognition Engine Class but my script doesn’t work properly.

If I use a custom grammar (with very few words like “start” or “exit”) the program will always recognize one of the my words even though I said something completely different.
For istance I say “stackoverflow” and the program recognizes “start”.

With a default dictionary the program becomes almost impossible to use (I have to be 100% correct otherwise it won’t understand).

The strange thing is that if I use Speech Recognizer instead of Speech Recognition Engine my program works perfect but ofcourse everytime I say something unrelated it messes up because Windows Speech Recognition handles the result and I don’t want that to happen. That is the reason why I am using Speech Recognition Engine actually.

What am I doing wrong?

Choices c = new Choices(new string[] { "use", "menu", "map", "save", "talk", "esc" });
GrammarBuilder gb = new GrammarBuilder(c);
Grammar g = new Grammar(gb);
sr = new SpeechRecognitionEngine();
sr.LoadGrammar(g);
sr.SetInputToDefaultAudioDevice();
sr.SpeechRecognized += sr_SpeechRecognized;

Almost forgot, I don’t know if that’s relevant but I am using Visual Studio 11 Ultimate Beta.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:00:56+00:00Added an answer on May 31, 2026 at 3:00 am

    For each speech recognition result detected you also receive the confidence for the recognition – a low confidence level would indicate that the engine is “not so sure” about the result and you might want to reject it, e.g.:

    private void SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
    {
        if (e.Result.Confidence >= 0.7)
        {
           //high enough confidence, use result
        }
        else
        {
          //reject result
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a little application for osx to listen and send commands over a
So I'm writing an application that will do a little screen scraping. I'm using
I'm writing a little wrapper for an application that uses files as arguments. The
Ok guys so a little background... I'm writing a small application that will assign
I'm writing a little application that will open my status reports that are in
I am using ColdFusion 8.0.1. I am writing a little code in the application
Ok, background to the problem: I'm writing a little application that looks at the
I'm writing a little web application that has two things in it : At
I'm writing a little desktop application that plugs into Google Calendar (or other iCal-powered
I am writing a little application that performs some simple actions on some specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.