Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Dear,

If I write any sentence in textbox and click to the sound button then read the writing sentence of the textbox.(means same as Google -->More-->Translate )in c# .net
Posted

This is quite easy, for those languages where text-to-speech is supported by available Microsoft language packs for Windows. I personally know only the support for English, not sure about other languages (I suspect this is only English, not sure; for other languages, third-party products may exist; I just heard of some of such things).

All you need is to reference the assembly "System.Speech.dll". This assembly is actually bundled with .NET Framework, placed in the GAC, so you will need to reference it via the tab ".NET" of the "Add Reference" window, in case you use Visual Studio.

Please see System.Speech.Synthesis part of the .NET Speech API:
http://msdn.microsoft.com/en-us/library/system.speech.synthesis.aspx[^].

Using it is really simple, the documentation referenced above is complete with clear code samples.

—SA
 
Share this answer
 
Comments
Thanks7872 24-Jul-13 1:49am    
Nice explanation.↑voted. Further i suggested some of the useful links in my below answer.
Sergey Alexandrovich Kryukov 24-Jul-13 1:52am    
Sure. Thank you, Rohan.
—SA
Well,there is wonderful explanation already given by Sergey with above answer,so i would like to suggest you some of the articles which explains text to speech.It should be noted that some modifications needs to be done.

Text to Speech[Codeproject][^]

Text-To-Speech(2)[Codeproject][^]

Speech recognition, speech to text, text to speech, and speech synthesis in C#[^]

Regards..:laugh:
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 24-Jul-13 1:52am    
Yes, can be useful, too, a 5.
—SA
Thanks7872 24-Jul-13 1:53am    
Thanks sergey.
Ashwini kumbhar 27-Jul-13 4:37am    
thank u rohan sir for giving me answer
Thanks7872 27-Jul-13 7:45am    
You are welcome.You can accept this as answer if it helped you.
You can use Microsoft Speech SDK for your requirement.
Download SDK and find the details at MSDN

You can find the Complete Source Code to implement the Text to Speech using MS Speech SDK is given.
 
Share this answer
 
v3
Comments
Sergey Alexandrovich Kryukov 24-Jul-13 1:21am    
This would make a solution, but this is a huge overkill for just the text-to-speech, because .NET Framework already comes with the ready-to-use .NET assembly System.Speech. There is absolutely no need to download and use SDK, to use the feature with C#.

Please see my answer.
—SA

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