Ian,

Can you not just add a reference to System.Speech in .NET4 and then use 
System.Speech.Recognition.SpeechRecognitionEngine APIs?
e.g. SetInputToWaveFile(string 
path)<http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognitionengine.setinputtowavefile.aspx>
 has a nice code sample.


From: [email protected] [mailto:[email protected]] On 
Behalf Of Ian Thomas
Sent: Sunday, 25 March 2012 3:08 PM
To: [email protected]
Subject: Microsoft Speech API (SAPI v5.4) to C#

I would like to experiment with a very simple speech to text application which 
will take an emailed voice mail (.WAV attached to an email) and re-email the 
converted text. This should be possible with SAPI 5.4 - I am aware of the 
problems in making the recognition sufficiently accurate, but that is a future 
consideration. My request for help is in getting C++ for Win32 into C#.
Finding downloads and information for SAPI on MSDN was a little difficult (and 
the development seemed to stop in 2010, and it's now wrapped in the Windows 
SDK), but much of it is subsumed into .NET v3.5 onwards. Unfortunately, my C++ 
experience is very small and there don't seem to be complete C# examples to 
guide me.
What suits me as a simple starting point is this sample in C++ Using WAV File 
Input with SR 
Engines<http://msdn.microsoft.com/en-us/library/ms717071%28VS.85%29.aspx> - for 
SAPI 5.3 (Win32, not .NET).
Would someone be kind enough to massage it into a rudimentary VS2010 C# project 
for me? This might require locating the relevant members within 
System.Speech.Recognition and equating the Const in the C++ header files (I 
think).
I have attached a text file of the C++ code from the link above. The MSDN help 
for the .NET assembly is 
here<http://msdn.microsoft.com/en-us/library/system.speech.recognition(v=vs.90).aspx>.
________________________________

Ian Thomas
Victoria Park, Western Australia

Reply via email to