Results 1 to 7 of 7

Thread: Speech recognition

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2016
    Posts
    12

    Speech recognition

    Hi everyone

    I'd like to add a speech regnition function on my project. So first i've tested the Windows speech recognition,
    but it is worse one which has ever existed i think.

    So I'm now looking for a better way to do it.

    Can someone help me ?

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,712

    Re: Speech recognition

    I find the System.Speech.Recognition Namespace works well. You've stated that you've tested the Windows Speech Recognition is this what you're referring to?
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2016
    Posts
    12

    Re: Speech recognition

    I was talking about the Speech Recognition that when you start it you get a small window (oval) .
    So when you said The System.Speech.Recognition Namespace works well, what did you exactly mean, and how to use it ?

  4. #4
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,712

    Re: Speech recognition

    The first place to go to is the MSDN documentation: https://msdn.microsoft.com/en-us/lib...or=-2147217396

    If you're unfamiliar with reading the documentation, within a namespace it will include all of the classes and enumerations(if applicable), followed by any remarks and notes, followed by any examples. Since you have no knowledge of the namespace, I'd start at the remarks to see how everything works. Go through that first and if you're still unsure of how to use the namespace I'd move onto other tutorials which is just a quick Google search away.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2016
    Posts
    12

    Re: Speech recognition

    Thank you,
    But the Remarks doesn't help me, i still not uderstand how to add a speech regnition function and use it.
    So can you make a little project and send it to me, or it spends too much time to do it ?

  6. #6
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,712

    Re: Speech recognition

    The remarks section lays out what you need to do:

    You create grammars, which consist of a set of rules or constraints, to define words and phrases that your application will recognize as meaningful input.
    From this comment, you should at least recognize that you need to create a Grammar. The very next sentence says:

    Using a constructor for the Grammar class, you can create a grammar object at runtime from GrammarBuilder or SrgsDocument instances, or from a file, a string, or a stream that contains a definition of a grammar.
    This reiterates the point made in the first sentence that you need to create a Grammar only it also expands on how to create a Grammar. Let's see what the next sentence says:

    Using the GrammarBuilder and Choices classes, you can programmatically create grammars of low to medium complexity that can be used to perform recognition for many common scenarios.
    From this comment, you should recognize that you can programmatically create simple grammars by using the GrammarBuilder class. It's safe to assume that the other constructors of the Grammar class(from a file, string, or stream) will recognize more complex grammars. In fact, let's read the very next sentence:

    To create grammars programmatically that conform to the Speech Recognition Grammar Specification 1.0 (SRGS) and take advantage of the authoring flexibility of SRGS, use the types of the System.Speech.Recognition.SrgsGrammar namespace.
    This reiterates the point made in the prior sentence that you should use SRGS patterns to create complex grammars.

    So from walking through those comments that ultimately make up the remarks section that if you want to create a simple speech recognition program that you need to create a Grammar using the GrammarBuilder class.

    Why don't you try, by yourself, to create a Grammar using the GrammarBuilder class. If you don't know how to(which I expect if you're just now reading about the namespace the class resides in) then you should do the same thing that we did in the namespace, go through the remarks to get a general idea on how it works and then go through the examples to see how somebody else has already done it. It appears as though the examples are in C#, not to worry, just copy and paste the code into a C# to VB.NET translator(like this one).

    If you truly get stumped making a Grammar, come back here and explain what you attempted(along with the code) followed by what you're expecting it to do.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  7. #7

    Thread Starter
    New Member
    Join Date
    Jan 2016
    Posts
    12

    Re: Speech recognition

    ok, but I still don't understand if I have to add any DLL or to import anything.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width