Click here to Skip to main content
15,900,108 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If you please,
how to converting audio to binary
and recording voice from Microphone by C#
Posted
Comments
Simon Bang Terkildsen 16-Aug-11 17:42pm    
Your title and actual question doesn't match. You're asking how to record input from a microphone and how to save that recording, but your title asks how to convert text to speech.
Sergey Alexandrovich Kryukov 16-Aug-11 17:43pm    
What does "audio to binary" mean? Everything is binary, including text.
--SA

 
Share this answer
 
You already have good answers on text-to-speech on your previous question:

convert from text to speech[^]

So either you didn't look at the answers to your last question or you are actually asking about speech-to-text.

Google: "speech to text" or "speech recognition"

Nuance has been producing Dragon Naturally Speaking for years and they are still perfecting it.

There appear to be some free web services that will do it, but I suspect their accuracy may be poor.

Or perhaps you should investigate the new Kinect SDK which includes a sophisticated microphone array and speech recongition software.

Depends on what you want to do with the speech you are recongizing.
 
Share this answer
 
Text to speech with .NET is fairly easy: use System.Speech.Synthesis, use the class System.Speech.Synthesis.SpeechSynthesizer, see http://msdn.microsoft.com/en-us/library/system.speech.synthesis.aspx[^].

Speech recognition is much more difficult, see System.Speech.Recognition, http://msdn.microsoft.com/en-us/library/system.speech.recognition.aspx[^], use the either the class SpeechRecognitionEngine or SpeechRecognizer, see:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognitionengine.aspx[^],
http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognizer.aspx[^].

Code samples are available, see the above MDSN articles. The recognition classes normally work with the microphone, you won't need to do anything to prepare the microphone input. Some relatively difficult part is this: first class works only with Apartment State System.Threading.ApartmentState.MTA, second one — only with System.Threading.ApartmentState.STA, see http://msdn.microsoft.com/en-us/library/system.threading.apartmentstate%28v=VS.100%29.aspx[^]. Your UI library may work only in one of those apartment state (this is the case with WPF which requires STA), so you might need run the engine in a separate thread using System.Threading.Thread.SetApartmentState, see http://msdn.microsoft.com/en-us/library/system.threading.thread.aspx[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900