Write a simple program to make your computer talk for you.
Using the Code
- Add a textbox named '
txtWords' to a form.
- Add a button named '
btnSpeak' to a form.
- Add a reference to
- In the form's code-behind, add:
public partial Class Form1: Form
public SpeechSynthesizer _synthesizer;
private void btnSpeak_Click(object sender, EventArgs e)
_synthesizer = new SpeechSynthesizer();
var words = txtWords.Text;
- Run. Text entered into the textbox will be spoken by the computer.