0

Whenever I say "Search for" something, my web browser will open will a random search term. It's almost if the computer couldn't understand me. I even spoke pure U.S. English and it still didn't quite get it. (Windows Form App C#)

Scenario 1: I said "Search for Facebook" and Google opened and the search text said "baseball"

Scenario 2: I said "Search for cars" and Google opened and the search text said "cost"

Scenario 3: I said "cat chases mouse" and Google opened and the search text said "and cat feces miles"

Is there anyway to better way to train the speech recognition?

//Search Google
            default:
                if (speech.ToLower().Contains("search for")) // See if the string contains the 'search for' string.
                {
                    string query = speech.Replace("search for", ""); // Remove the 'search for' text.
                    // Old code (does not make the text fully URL safe)
                    // query = query.Replace(' ', '+'); 
                    query = System.Web.HttpUtility.UrlEncode(query);
                    string url = "https://www.google.com/search?q=" + query;
                    System.Diagnostics.Process.Start(url);
                }
                break;
user2764826
  • 1
  • 1
  • 3
  • There are locale/language settings in Android. Are you certain the voice recognition software is at fault though, it seems to work fairly well for me on my phone... And what do you mean by "I even spoke pure U.S. English", did you get similar results with other languages as well (which)? – UIlrvnd Sep 11 '13 at 01:13
  • Hi, I'm using a Windows form application in C#. Not android. Maybe it's my mic..I'm not sure. – user2764826 Sep 11 '13 at 01:16
  • Wait, since you said Google I thought you were using their vr... Windows' built-in one was crap last time I checked (on win 7)... – UIlrvnd Sep 11 '13 at 01:17
  • And yes, you should be able to train it from speech recognition settings or something(though that could actually make it worse ^_^). – UIlrvnd Sep 11 '13 at 01:23
  • Do you know how to make it better? – user2764826 Sep 11 '13 at 02:35
  • No clue, i gave up on it years ago... – UIlrvnd Sep 11 '13 at 02:45

2 Answers2

1
string Speech = e.Result.Text;
if (Speech == "I WANT TO SEARCH SOMETHING")
  {
    QEvent = Speech;
    wiki.SpeakAsync("what do you want to search");
    Speech = string.Empty;
  }
 else if (Speech != string.Empty && QEvent == "I WANT TO SEARCH SOMETHING")
   {
     Process.Start("http://google.com/search?q=" + Speech);
     QEvent = string.Empty;

     Num = rnd.Next(1, 4);
     if (Num == 1) { wiki.SpeakAsync("Alright, I am searching " + Speech + " in google"); }
     else if (Num == 2) { wiki.SpeakAsync("ok sir, I am searching " + Speech); }
     else if (Num == 3) { wiki.SpeakAsync("Alright, I am searching "); }
     Speech = string.Empty;

   }
kjhughes
  • 106,133
  • 27
  • 181
  • 240
0

The <dictation> tag in SAPI grammars tends to have lower accuracy than the pure dictation grammar, mostly because the <dictation> tag doesn't take advantage of context (which hugely improves accuracy).

That being said, however, if you open up the Control Panel and search for "speech", you will find the Speech Recognition control panel, which has an item 'Train your computer to better understand you'. Run through this several times and accuracy should improve.

Also, microphone choice is critical. A good quality headset microphone will do wonders for accuracy. Webcam or desk microphones tend not to do well, as the audio levels vary too much.

Eric Brown
  • 13,774
  • 7
  • 30
  • 71