[sourcecode language="csharp"]
using System;
using System.Windows.Forms;
using SpeechLib;// need this reference as we use functions from the SAPI
namespace Speech
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SpVoice voice = new SpVoice();
voice.Speak("Welcome to Code Zone", SpeechVoiceSpeakFlags.SVSFDefault);//speak using default settings
}
}
}
[/sourcecode]
No comments:
Post a Comment