Esempio n. 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;
        }
Esempio n. 2
0
 public void Asynth()
 {
     try
     {
         aSynth.SpeakAsyncCancelAll();
         pBuilder.ClearContent();
         pBuilder.AppendText(sentence);
         aSynth.Speak(pBuilder);
     }
     catch { return; }
 }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
 private void buttonCancel_Click(object sender, EventArgs e)
 {
     _synth.SpeakAsyncCancelAll();
 }