public void Stop() { if (!IsStarted) { throw new InvalidOperationException("The Julius session is not started."); } JuliusProcess.Stop(); IsListening = false; IsStarted = false; }
public void Start() { if (IsStarted) { throw new InvalidOperationException("The Julius session is already started."); } else if (IsStopped) { JuliusProcess = new ConsoleProcess(JuliusExe, JuliusArgs.ToArray(), onOutput: OnProcessOutput, onError: OnErrorOutput); } JuliusProcess.Start(); IsStarted = true; }
public void WaitForExit() { JuliusProcess.WaitForExit(); }