テキスト読み上げ用のコードを作成します。これを行う方法は?? Windows 7 OS を使用しています。xamppもダウンロードします。
using System.Speech.Synthesis;
namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
SpeechSynthesizer synthesizer = new SpeechSynthesizer();
synthesizer.Volume = 100; // 0...100
synthesizer.Rate = -2; // -10...10
// Synchronous
synthesizer.Speak("Hello World");
// Asynchronous
synthesizer.SpeakAsync("Hello World");
}
}
}