I need to add Speech to Text capability to an MS bot written in C#.
I'm new to C# (although I do know C++) and was wondering if I can use JS for the same. I'm quite familiar with JavaScript and have written Speech to Text module using SpeechSynthesis API for a bot that was written in Python.
Or is it better that I figure C# out? (I'd have to use another API for this, say Bing Speech API).
Do share your thoughts.
Depending on what your doing there are few alternatives. Let's say you want to go predefined commands vs dictation.
Predefined commands would be used as a case statement or if statement.
The first thing you would do is reference the System.Speech. Once that is referenced. Then you activate the namespace using.
using System.Speech.Recognition;
Then you would declare some classes and variables.
SpeechRecognition sr = new SpeechRecognition();
Then you can use a predefined text to hold commands.
Also you would need to set the input to default microphone. Then set the recognize state mode to multiple. And reference the txt command list to pull the string values.
You can also add the synthesis to the code as well and have your computer talk back to you.
**Note that free dictation would be the same process and with a little more code. Please see this for more examples on speech https://msdn.microsoft.com/en-us/library/office/hh361683(v=office.14).aspx