コード例 #1
0
        private void TrkSpeechRate_Scroll(object sender, EventArgs e)
        {
            synthSAPI.SpeakAsyncCancelAll();
            int val = trkSpeechRate.Value;

            synthSAPI.SpeakAsync("rate " + val);
            val = val - 10;
            Properties.Settings.Default.SAPISpeechRate = val;
            synthSAPI.Rate = val;
        }
コード例 #2
0
 public void Asynth()
 {
     try
     {
         aSynth.SpeakAsyncCancelAll();
         pBuilder.ClearContent();
         pBuilder.AppendText(sentence);
         aSynth.Speak(pBuilder);
     }
     catch { return; }
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: Zerq/SakuraBlue
        static void Main(string[] args)
        {
            System.Speech.Synthesis.SpeechSynthesizer synth = new System.Speech.Synthesis.SpeechSynthesizer();
            List <InstalledVoice> voices = new List <InstalledVoice>();

            voices.AddRange(synth.GetInstalledVoices(new CultureInfo("en-GB")));
            voices.AddRange(synth.GetInstalledVoices(new CultureInfo("en-US")));

            //   synth.Voice.
            synth.SpeakAsync(@"one two three blarg!
Shoe shop event horizon.
bannana puding to the nth degree
poisoning pigeons in the park");

            Console.Read();
            synth.SpeakAsyncCancelAll();
        }
コード例 #4
0
 private void buttonCancel_Click(object sender, EventArgs e)
 {
     _synth.SpeakAsyncCancelAll();
 }