static void Main(string[] args) { tts.TextSpeech("I am listening...").Wait(); speech.SpeechToText().Wait(); string voice = ProgramRestSTT.text.ToLower(); if (voice == "nothing recorded") { cmd = ""; } else { cmd = ProgramKB.FredKB(voice); } cmd = cmd.Replace("\"", ""); switch (cmd) { case "Fred Sees": // run Fred Sees code tts.TextSpeech("I see you Mark!").Wait(); break; case "Fred Reads": // run Fred Reads code break; case "Light On": // run Light On code break; case "Light Off": // run Light Off code break; default: FredQnA().Wait(); break; } }
public void Speak(string speech) { test.TextSpeech(speech).Wait(); NetCoreSample.Audio(path); }