Beispiel #1
0
        private static void Sr_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
        {
            try
            {
                SoundSystem.StartASync(100);

                //if (e.Result.Confidence < 0.9f)
                //    return;

                var msg = e?.Result?.Text?.ToLower() ?? String.Empty;
                IRC.IRCClient.PrintConsoleMessage(msg + " - " + e.Result.Confidence.ToString());

                switch (msg)
                {
                case "clear queue":
                    SyncPool.SkipALLMessages();
                    break;

                case "slow down":
                    SyncPool.SlowDown();
                    break;

                case "speed up":
                    SyncPool.SpeedUp();
                    break;

                case "normal speed":
                    SyncPool.NormalSpeed();
                    break;

                default:

                    //Advanced Command?

                    if (msg.Contains("repeat") && msg.Contains("message"))
                    {
                        var user = msg.Replace("repeat", "").Replace("message", "");
                        SyncPool.RepeatFuzzyUser(user);
                    }

                    break;
                }
            }
            catch (Exception ex)
            {
                Utils.Logger.Log(ex.ToString());
            }
        }
        private static void Sr_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
        {
            try
            {
                if (e.Result.Confidence < 0.9f)
                {
                    return;
                }

                var msg = e?.Result?.Text ?? String.Empty;
                msg += " - " + e.Result.Confidence.ToString();
                IRC.IRCClient.PrintConsoleMessage(msg);

                switch (e?.Result?.Text.ToLower() ?? null)
                {
                case "boom shakalaka":
                case "wubba lubba dub dub":
                case "hit the sack jack":
                    SyncPool.SkipOneMessage();
                    break;

                case "slow the frak down":
                    SyncPool.SlowDown();
                    break;

                case "speed the hell up":
                    SyncPool.SpeedUp();
                    break;

                case "play normal speed":
                    SyncPool.NormalSpeed();
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                Utils.Logger.Log(ex.ToString());
            }
        }
Beispiel #3
0
 public static void UpdateThread()
 {
     //Check to see if I'm Talking...
     if (talking)
     {
         if (!paused)
         {
             paused = true;
             SyncPool.Pause();
             //IRC.IRCClient.PrintConsoleMessage("Pause");
         }
     }
     else
     {
         if (paused)
         {
             SyncPool.Resume();
             //IRC.IRCClient.PrintConsoleMessage("Resume");
             paused = false;
         }
     }
 }