Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
hello everyone, i have done speech recognition app offline by using the speech library which call load grammer method which contains the words in code.


but it is not good if the words written in the code , because the english language is huge so it is good to make databasefor all words

but it is hard, can i store all words in database ?? and how can i make correlation between my spoken word and the saved word in database ??


can you help me, please ?



C#
Choices SLES = new Choices(); // class Choice of loadGrammer Method
            SLES.Add(new String[] {"hello","how","are" ,"you","book","conversation","the","peace","he","translates", "text", "from","Arabic","to","English","language","exit", "everyone", "in","translator","it" });
            Grammar gr = new Grammar(new GrammarBuilder(SLES));
            try
            {
                recognizer.RequestRecognizerUpdate(); //Request of Recognition
                recognizer.LoadGrammar(gr); //load Grammer
                recognizer.SpeechRecognized += recognizer_SpeechRecognized;
                recognizer.SetInputToDefaultAudioDevice(); 
                recognizer.RecognizeAsync(RecognizeMode.Multiple); 

                    }
Posted
Updated 4-Aug-21 16:47pm
v2
Comments
BillWoodruff 20-Nov-14 10:58am    
"can i store all words in database ?" Why not ?

"how can i make correlation between my spoken word and the saved word in database ?" the same way you query a database for a match(es) with any other type of data.

But, do you really need a database here, or do you need some kind of static class full of static information that you compile to a .dll and use in your project ?
Sergey Alexandrovich Kryukov 20-Nov-14 11:26am    
There is a dictation grammar already, which can be used via system.speech.dll, but the quality...
The problem is not the dictionary, the problem is: if you have words/phrases even remotely similar in pronunciation, recognition fails to pick the right one. I think doing it well is nearly impossible without detailed semantic natural language recognition, otherwise it will recognize "Nutcracker" as "night cracker" (real-life example!), and other things like that... :-)

Anyway, please see my answer.

—SA
Me is Needer 20-Nov-14 12:09pm    
thank you so much , but fisrt my project is simple for isolated word(word by word)


i have used system.speech.dll, but the words to recognize is written in the code, this is my proplem, i dont want the words be in code because i want to use all english words and they are huge


guide me, please
Sergey Alexandrovich Kryukov 20-Nov-14 12:14pm    
This is another problem. You can always read those words, for example, from some file...
—SA
Me is Needer 20-Nov-14 12:41pm    
Mr Sergey, i have done the above code , those words like"hello,..." are written inside the code this is for simple collection words, but if i want to contain all words in English , how can i do ??

There is a predefined grammar for dictation covering some big dictionary, System.Speech.Recognition.DictationGrammar:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.dictationgrammar%28v=vs.110%29.aspx[^].

However, don't hold your breath. I tried it with the engine supplied by Microsoft for Windows XP and 7. The quality of recognition for small grammars with distinctly different words/phrases was fairly good, but for dictation it was quite bad. I'm not sure if you can get something much better. See also my comment to the question.

—SA
 
Share this answer
 
v2
Maybe this might be of interest to the OP; it made an interesting read for me: https://software.intel.com/en-us/articles/voice-recognition-and-synthesis-using-the-intel-perceptual-computing-sdk

There are a dozen others just like the one Microsoft offer if you search Google for C# Speech Recognition Library. You will find some of the ones Sergey is probably referring to.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 21-Nov-14 11:25am    
5ed.
—SA
[no name] 21-Nov-14 15:19pm    
Thank you; I also gave you 5 for your solution ;)
Sergey Alexandrovich Kryukov 21-Nov-14 16:31pm    
Thank you.
—SA
There are some articles on code project, you may take help from it

Speech recognition, speech to text, text to speech, and speech synthesis in C#[^]

Speech Recognition for the Web[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900