3
$\begingroup$

How can i add local database for voice recognition for visual studio c#. I want to get the commands from the database and also the function for send-keys I want to get it from the database how will I do that?

$\endgroup$
1
$\begingroup$

The easiest way is by using System. Speech. Recognition; here is described how to use it

Just change this code:

colors.Add(new string[] { "red", "green", "blue" });

And add results of a database query, for example, with Entity Framework and LINQ instead of new string [] {"red", "green", "blue"}. Something like this:

WordsToRecognize.Add(
context.MyTable
       .Where(x => x.Type == "type")
       .Select(x => new { x.Text }).ToList());

I'm not tested the code above, it just pseudocode

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.