using System; using System.Collections.Generic; using System.Diagnostics; namespace Speech.tts { public class WinTTS : ISpeechSystem { // pico2wave --lang=de-DE --wave=/tmp/test.wav "Guten Morgen"; aplay /tmp/test.wav; rm /tmp/test.wav public Process GenerateTTS(string path, string voiceName, string lang, string sentance) { Process p = new Process(); List arg = new List(); if (!String.IsNullOrEmpty(path)) arg.Add("--path=" + path); //arg.Add("--ssml"); arg.Add("\"" + sentance + "\""); //p.StartInfo.FileName = "WinTTS.exe " + String.Join(' ', arg); p.StartInfo.FileName = "WinTTS.exe"; p.StartInfo.Arguments = String.Join(' ', arg); System.Diagnostics.Debug.WriteLine("WinTTS.exe " + String.Join(' ', arg)); p.StartInfo.WorkingDirectory = Environment.CurrentDirectory; p.StartInfo.CreateNoWindow = true; return p; } public string GetName() { return "Windows TTS"; } } }