Click here to Skip to main content
Sign Up to vote bad
good
See more: C#4.0
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 18 Dec '12 - 11:41
iman_kh438
Edited 18 Dec '12 - 11:43

Comments
Sergey Alexandrovich Kryukov - 18 Dec '12 - 19:27
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
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Ron Beyer 220
1 OriginalGriff 203
2 Mahesh Bailwal 190
3 Aarti Meswania 185
4 Rohan Leuva 180
0 Sergey Alexandrovich Kryukov 8,548
1 OriginalGriff 6,819
2 CPallini 3,648
3 Rohan Leuva 2,933
4 Maciej Los 2,288


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 18 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid