Grant Yes, I mucked about a bit yesterday - I discovered that everything that is in SAPI seems to be available in the v3.5 .NET assemblies, so I set the reference and experimented with the various classes, and found that .SetInputToWaveFile() worked for ~ OK me.
Thanks for the link though - the event management is worth using (and it's C# code). I still need to improve recognition accuracy, which I suppose means adding some words to the grammar (not sure about that yet). Different CultureTypes did not improve the recognition (en_US seems best for Scots accent). I guess that is why people buy Dragon Dictate. _____ Ian Thomas Victoria Park, Western Australia _____ From: [email protected] [mailto:[email protected]] On Behalf Of Grant Holliday Sent: Monday, March 26, 2012 9:31 AM To: ozDotNet Subject: RE: Microsoft Speech API (SAPI v5.4) to C# 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 <http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrec ognitionengine.setinputtowavefile.aspx> path) 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 <http://msdn.microsoft.com/en-us/library/ms717071%28VS.85%29.aspx> WAV File Input with SR Engines - 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
