Click here to Skip to main content
15,881,881 members
Home / Discussions / C#
   

C#

 
GeneralRe: Looking for Critique of My Answers to Recent C# Multithreading Interview Questions... Pin
clientSurfer29-Aug-15 16:48
professionalclientSurfer29-Aug-15 16:48 
GeneralRe: Looking for Critique of My Answers to Recent C# Multithreading Interview Questions... Pin
BillWoodruff29-Aug-15 23:29
professionalBillWoodruff29-Aug-15 23:29 
GeneralRe: Looking for Critique of My Answers to Recent C# Multithreading Interview Questions... Pin
clientSurfer30-Aug-15 6:48
professionalclientSurfer30-Aug-15 6:48 
Questionspeech recognition in C# Pin
Member 1178520026-Aug-15 7:28
Member 1178520026-Aug-15 7:28 
AnswerRe: speech recognition in C# Pin
Richard MacCutchan26-Aug-15 22:14
mveRichard MacCutchan26-Aug-15 22:14 
JokeRe: speech recognition in C# Pin
Pete O'Hanlon27-Aug-15 4:21
mvePete O'Hanlon27-Aug-15 4:21 
GeneralRe: speech recognition in C# Pin
Richard MacCutchan27-Aug-15 4:47
mveRichard MacCutchan27-Aug-15 4:47 
QuestionMicrosoft.Speech AppendDictation Pin
Member 1192461826-Aug-15 1:07
Member 1192461826-Aug-15 1:07 
I want to recognize speech when user speaks. In Microsoft.Speech Append.Dictation method doesn't invoke SpeechRecognized event.. Not recognizing the speech. Kindly help me in resolving the issue.

Code--
static void Main(string[] args)
       {
           // Create a SpeechRecognitionEngine object for the default recognizer in the en-US locale.
           using (
           SpeechRecognitionEngine recognizer =
             new SpeechRecognitionEngine(
               new System.Globalization.CultureInfo("en-US")))
           {

               //// Create a grammar for finding services in different cities.
               //Choices services = new Choices(new string[] { "red", "green", "blue" });

               //GrammarBuilder findServices = new GrammarBuilder("Find");
               //findServices.Append(services);
               //// Create a Grammar object from the GrammarBuilder and load it to the recognizer.
               //Grammar servicesGrammar = new Grammar(findServices);
               //recognizer.LoadGrammarAsync(servicesGrammar);

               //GrammarBuilder startStop = new GrammarBuilder();
               //GrammarBuilder dictation = new GrammarBuilder();
               //dictation.AppendDictation();

               //startStop.Append(new SemanticResultKey("StartDictation", new SemanticResultValue("Begin", true)));
               //startStop.Append(new SemanticResultKey("DictationInput", dictation));
               //startStop.Append(new SemanticResultKey("StopDictation", new SemanticResultValue("Stop Dictation", false)));
               //Grammar grammar = new Grammar(startStop);
               //grammar.Enabled = true;
               //grammar.Name = " Free-Text Dictation ";
               //recognizer.LoadGrammarAsync(grammar);


               GrammarBuilder builder = new GrammarBuilder();
               //builder.Append("start");
               builder.AppendDictation("Start");
               //builder.Append("end");
               Grammar grammarWithDictation = new Grammar(builder);
               grammarWithDictation.Name = "Grammar with Dictation";
               recognizer.LoadGrammarAsync(grammarWithDictation);

               // Add a handler for the speech recognized event.
               recognizer.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(recognizer_SpeechRecognized);

               // Configure the input to the speech recognizer.
               recognizer.SetInputToDefaultAudioDevice();

               // Start asynchronous, continuous speech recognition.
               recognizer.RecognizeAsync(RecognizeMode.Multiple);

               // Keep the console window open.
               while (true)
               {
                   Console.ReadLine();
               }
           }

       }

       static void recognizer_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
       {
           Console.WriteLine("Recognized text: " + e.Result.Text);
       }

QuestionConnect to Report server using a C# service. Pin
Member 328413825-Aug-15 21:38
Member 328413825-Aug-15 21:38 
AnswerRe: Connect to Report server using a C# service. Pin
Herman<T>.Instance25-Aug-15 21:50
Herman<T>.Instance25-Aug-15 21:50 
QuestionExec within an sqlstament for Excecutenonquery Pin
pschulz25-Aug-15 18:20
pschulz25-Aug-15 18:20 
AnswerRe: Exec within an sqlstament for Excecutenonquery Pin
Wendelius25-Aug-15 18:26
mentorWendelius25-Aug-15 18:26 
SuggestionRe: Exec within an sqlstament for Excecutenonquery Pin
Richard Deeming26-Aug-15 2:11
mveRichard Deeming26-Aug-15 2:11 
GeneralRe: Exec within an sqlstament for Excecutenonquery Pin
Wendelius26-Aug-15 2:42
mentorWendelius26-Aug-15 2:42 
AnswerRe: Exec within an sqlstament for Excecutenonquery Pin
Richard Deeming26-Aug-15 2:16
mveRichard Deeming26-Aug-15 2:16 
AnswerRe: Exec within an sqlstament for Excecutenonquery Pin
pschulz28-Aug-15 17:39
pschulz28-Aug-15 17:39 
AnswerRe: Exec within an sqlstament for Excecutenonquery Pin
ebk213-Sep-15 13:00
ebk213-Sep-15 13:00 
QuestionHow to achieve WPF window designer? Pin
Member 1193585525-Aug-15 17:51
Member 1193585525-Aug-15 17:51 
AnswerRe: How to achieve WPF window designer? Pin
Pete O'Hanlon25-Aug-15 21:05
mvePete O'Hanlon25-Aug-15 21:05 
QuestionWeb-Api in Mvc5.net Pin
Member 1190393725-Aug-15 4:51
Member 1190393725-Aug-15 4:51 
AnswerRe: Web-Api in Mvc5.net Pin
Dave Kreskowiak25-Aug-15 5:24
mveDave Kreskowiak25-Aug-15 5:24 
Questionuse ready made form in another form Pin
mattlas24-Aug-15 22:46
mattlas24-Aug-15 22:46 
AnswerRe: use ready made form in another form Pin
OriginalGriff24-Aug-15 22:56
mveOriginalGriff24-Aug-15 22:56 
GeneralRe: use ready made form in another form Pin
mattlas24-Aug-15 23:43
mattlas24-Aug-15 23:43 
GeneralRe: use ready made form in another form Pin
OriginalGriff24-Aug-15 23:48
mveOriginalGriff24-Aug-15 23:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.