Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hi i want to dictate digit to speech recognition one by one
example : i want to dictate 5478 as 5,4,6,7 not five thousand four hundred sixty seven !
can you help me to create grammer builder for this dictate type?

note : the count of digits of number is variable not fixed !

thnaks
Posted
Updated 18-Dec-12 11:43am
v2
Comments
Sergey Alexandrovich Kryukov 18-Dec-12 19:27pm    
This is not really a question, despite one question mark I could see. Help with what? To help, we would need you to explain the problems. This task is easy enough, so...
I provided the overview of what is involved, not a big deal.
—SA

1 solution

First, don't use SAPI directly, add the reference to "System.Speech.dll". This assembly comes with .NET and is in GAC, so you can add the reference from the tab ".NET" of the "Add Reference" window. The namespace is System.Speech.Recognition:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.aspx[^].

You need to use either SpeechRecognizer or SpeechRecognitionEngine depending on the features you want, but, most likely, both will work for you. Be careful: one requires STA, another &mdsh; MTA thread apartment state, so you might use on in a separate thread, but this is rarely needed; for example, both console and System.Windows.Forms UI can work in either thread apartment model, but WPF requires STA.

Now, what you want is much simpler than five "thousand four hundred sixty seven": you will only need to add 10 digits to grammar, plus probably some words. It's likely that you will need a voice command to enter the whole set of data, or something like that. Please see:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.grammar.aspx[^],
http://msdn.microsoft.com/en-us/library/system.speech.recognition.grammarbuilder.aspx[^].

—SA
 
Share this answer
 

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