Hello Everyone , Today I will show you how convert text to speech using c# .... So Lets Go.
First Create a Widows Project in VS2010 (My Current VS Version) .
After Create A Project you must add a reference System.Speech
Now Add a TextBox and Button On Form.
Now Coding Time ...
Thanks .... Happy Coding :)
First Create a Widows Project in VS2010 (My Current VS Version) .
After Create A Project you must add a reference System.Speech
Now Add a TextBox and Button On Form.
Now Coding Time ...
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Speech.Synthesis; namespace TextToSpeech { public partial class Form1 : Form { SpeechSynthesizer Speech = new SpeechSynthesizer(); public Form1() { InitializeComponent(); } private void btnSpeak_Click(object sender, EventArgs e) { if (txtText.Text == string.Empty) { return; } else { Speech.SpeakAsync(txtText.Text); } } } }
Thanks .... Happy Coding :)
Hi,
ReplyDeleteThanks for your code. But in this speech.speakasync is not working in client machine,
If i host in IIS and try to access with my system IP address from client system (other system) sound is playing from my system (server system) but not from client system.
Can you please help me, i hope you understand my question