I m developing an c# project based on voice recognition. I want to recognize words in Indian English accent so for that i thought for lexicon & then adding pronunciations in that file but I m not getting how to add a lexicon in my project & how to create a lexicon?
Asked
Active
Viewed 1,563 times
1
-
It is entirely dependant on what speech recognition library you are using – Chris Laplante Jan 23 '14 at 16:30
-
i m using system.speech – prafullagrawal Jan 23 '14 at 16:38
1 Answers
1
Lexicons aren't exposed via System.Speech.Recognition, unfortunately. You can access lexicons using the SpeechLib automation interface to SAPI, though; the object you want to create is SpLexicon.
Note that System.Speech.Recognition will automatically load any user lexicons, so you can have a separate app to build the lexicon and your reco app can continue to use System.Speech.Recognition.
Also, if you're using a command & control grammar, you should specify pronunciations directly; for example, the SrgsToken class allows you to explicitly specify a pronunciation for the word. (Unfortunately, I can't remember how to do this with System.Speech.Recognition.GrammarBuilder
, but it is possible.)

Eric Brown
- 13,774
- 7
- 30
- 71
-
thank you bro..can you give me some basic example of separate app for building lexicon? – prafullagrawal Jan 24 '14 at 07:43
-
@prafullagrawal Look at [this answer](http://stackoverflow.com/questions/19994663/how-to-open-sapi-train-window-in-a-c-sharp-application/20028368#20028368) to see how to integrate SpeechLib, and then just call `new SpLexicon` to create the object and then call `AddPronunciation` to add the pronunciation. Since you will likely need custom pronunciations, the [English phone set documentation](http://msdn.microsoft.com/en-us/library/ee431828(v=vs.85).aspx) will also be handy. – Eric Brown Jan 24 '14 at 18:08