static void Main(string[] args) { Console.WriteLine("COMINT.Retrieval.Speech"); Console.WriteLine("Argument 1: Mode"); Console.WriteLine("Argument 2: Tool"); Console.WriteLine("Argument 3: Path"); Console.WriteLine("****************************************"); var basePath = Directory.GetCurrentDirectory() + @"\\..\\..\\..\\..\\Workplace\\"; var mode = Mode.SpeechToText; var tool = Tool.Google; var path = @"D:\Data\COMINT.Retrieval\Google\Noise\1"; if (args.Any()) { mode = (Mode)Enum.Parse(typeof(Mode), args[0]); tool = (Tool)Enum.Parse(typeof(Tool), args[1]); path = args[2]; } ISpeechEngine engine; switch (tool) { case Tool.Windows: engine = new WindowsSpeechEngine(); break; case Tool.Google: engine = new GoogleSpeechEngine(); break; default: throw new ArgumentException(); } switch (mode) { case Mode.TextToSpeech: Transformer.TextToSpeech(engine, path); break; case Mode.SpeechToText: Transformer.SpeechToText(engine, path); break; case Mode.Upload: engine.UploadFiles(path); break; } Console.WriteLine("**********************"); Console.WriteLine("****** FINISHED ******"); Console.WriteLine("**********************"); Console.ReadLine(); }
private void SC(float size, bool mode) { theme.FontSize = size; AudioDriverCSCore ad = new AudioDriverCSCore(); AudioQueue q = new AudioQueue(ad); WindowsSpeechEngine wse = new WindowsSpeechEngine(); SpeechSynthesizer ss = new SpeechSynthesizer(wse); SpeechConfigure c = new SpeechConfigure(); Variables ef = new Variables(); c.Init(q, ss, "Check SC", "Caption title", this.Icon, mode ? "Text to do" : null, true, true, AudioQueue.Priority.High, "sn", "en", "Sheila", "100", "Default", ef); c.ShowDialog(this); }