public void TrainingNumbers() { var lst = new List<Tuple<int, int>>(); for (var i = 1; i <= 5; i++) { var rate = Randomizer.Get.Int32(-2, 1); //-10..10 var number = Randomizer.Get.Int32(0, 199); var t = new Tuple<int, int>(number, rate); Debug.WriteLine("{0} - Rate: {1}", t.Item1, t.Item2); lst.Add(t); } using (var synth = new PolishSpeechSynthesizer()) { for (var i = 1; i <= 3; i++) { foreach (var t in lst) { synth.Rate = t.Item2; synth.Speak(t.Item1.ToString()); Thread.Sleep(1000); } Thread.Sleep(3000); } } }
private static void engine_SpeechRecognized(object sender, SpeechRecognizedEventArgs e) { var word = e.Result.Text; Console.WriteLine(word); using (var synth = new PolishSpeechSynthesizer()) { synth.Speak(word); } }
public void ShouldSpeakPolishWords() { using (var synth = new PolishSpeechSynthesizer()) { synth.Speak("nie"); synth.Speak("to"); synth.Speak("się"); synth.Speak("w"); synth.Speak("na"); synth.Speak("i"); synth.Speak("z"); synth.Speak("co"); synth.Speak("jest"); synth.Speak("że"); synth.Speak("do"); synth.Speak("tak"); synth.Speak("jak"); synth.Speak("o"); synth.Speak("mnie"); synth.Speak("a"); synth.Speak("ale"); synth.Speak("mi"); synth.Speak("za"); synth.Speak("ja"); synth.Speak("ci"); synth.Speak("tu"); synth.Speak("ty"); synth.Speak("czy"); synth.Speak("tym"); synth.Speak("go"); synth.Speak("tego"); synth.Speak("tylko"); synth.Speak("jestem"); synth.Speak("po"); synth.Speak("cię"); synth.Speak("ma"); synth.Speak("już"); synth.Speak("mam"); synth.Speak("jesteś"); synth.Speak("może"); synth.Speak("pan"); synth.Speak("dla"); synth.Speak("coś"); synth.Speak("dobrze"); synth.Speak("wiem"); synth.Speak("jeśli"); synth.Speak("teraz"); synth.Speak("proszę"); synth.Speak("od"); synth.Speak("wszystko"); synth.Speak("tam"); synth.Speak("więc"); synth.Speak("masz"); synth.Speak("nic"); } }
public void ShouldSpeakPolishNumbers() { using (var synth = new PolishSpeechSynthesizer()) { for (var i = 0; i <= 25; i++) { synth.Speak(i.ToString()); } } }
public void TrainingSums() { using (var synth = new PolishSpeechSynthesizer()) { synth.Rate = Randomizer.Get.Int32(-3, 1); //-10..10 var n1 = Randomizer.Get.Int32(0, 99); var n2 = Randomizer.Get.Int32(0, 99); var text = String.Format("{0} + {1} = {2}", n1, n2, n1 + n2); Debug.WriteLine(text); synth.Speak(text); } }