Beispiel #1
0
 public void Stop()
 {
     if (!IsStarted)
     {
         throw new InvalidOperationException("The Julius session is not started.");
     }
     JuliusProcess.Stop();
     IsListening = false;
     IsStarted   = false;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 public void WaitForExit()
 {
     JuliusProcess.WaitForExit();
 }