public void StopLoading()
 {
     Speaker.StopSpeak();
     SoundEffects.StopPlayer();
 }
 private void pictureBox3_Click(object sender, EventArgs e)
 {
     Speaker.SpeakOpenningProcess("facebook");
     Process.Start("http://www.facebook.com");
 }
Ejemplo n.º 3
0
 public void VolumeDown()
 {
     axWindowsMediaPlayer1.settings.volume -= 10;
     Speaker.SayWithStatus("diminuindo o volume do media player");
 }
Ejemplo n.º 4
0
 public void UnMute()
 {
     axWindowsMediaPlayer1.settings.mute = false;
     Speaker.SayWithStatus("tirando o media player do mudo");
 }
Ejemplo n.º 5
0
 public void Stop()
 {
     axWindowsMediaPlayer1.Ctlcontrols.stop(); // parar
     Speaker.Speak("parando");
 }
Ejemplo n.º 6
0
 public void BackFile()
 {
     axWindowsMediaPlayer1.Ctlcontrols.previous(); // anterior
     Speaker.Speak("indo para o anterior");
 }
Ejemplo n.º 7
0
        // evento das teclas
        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            Keys k = (Keys)e.KeyChar;

            if (k == Keys.Escape)
            {
                ExitNow(); // cham o método
            }
            else if (e.KeyChar == 'h' || e.KeyChar == 'H')
            {
                JARVISHelp.Introduction(); // introdução
            }
            else if (e.KeyChar == 's' || e.KeyChar == 'S')
            {
                Speaker.StopSpeak(); // parar de falar
            }
            else if (k == Keys.Up)
            {
                Speaker.VolumeUp();
            }
            else if (k == Keys.Down)
            {
                Speaker.VolumeDown();
            }
            else if (e.KeyChar == 'p' || e.KeyChar == 'P')
            {
                Speaker.ResumeOrPause(); // pausa ou resume
            }
            else if (e.KeyChar == 'i' || e.KeyChar == 'I')
            {
                SystemInfo.GetUserName();
                SystemInfo.GetMachineName();
                SystemInfo.GetOSVersion();
                SystemInfo.OSArch();
            }
            else if (e.KeyChar == 't' || e.KeyChar == 'T')
            {
                if (processList == null)
                {
                    processList = new ProcessList();
                    processList.Show();
                    processList.ShowProcesses();
                }
                else
                {
                    processList.ShowProcesses();
                }
            }
            else if (e.KeyChar == 'a' || e.KeyChar == 'A')
            {
                if (appsDialog == null)
                {
                    appsDialog = new AppsDialog();
                    appsDialog.Show();
                }
                else
                {
                    appsDialog.Show();
                }
            }
            else if (k == Keys.D5)
            {
                ChangeSkin();
            }
            else if (k == Keys.D6)
            {
                ChangeBackColor();
            }
            else if (k == Keys.D4)
            {
                if (selectVoice == null) // e for null
                {
                    selectVoice = new SelectVoice();
                    selectVoice.ShowDialog(); // diálogo
                    selectVoice.Close();      // já foi mostrado, então vamos fechar
                    selectVoice = null;       // deixando nulo
                }
            }
            else if (k == Keys.D1)
            {
                MinimizeWindow();
            }
            else if (k == Keys.D2)
            {
                BackWindowToNormal();
            }
            else if (e.KeyChar == 'm' || e.KeyChar == 'M')
            {
                motionDetection         = new MotionDetection();
                motionDetection.Visible = false;
                motionDetection.Show();
            }
            else if (e.KeyChar == 'f' || e.KeyChar == 'F')
            {
                personId = new PersonIdentifier();
                personId.Show();
                personId.StartRecognition();
            }
        }
 private void pictureBox6_Click(object sender, EventArgs e)
 {
     Speaker.SpeakOpenningProcess("windows media player");
     Process.Start("wmplayer");
 }
Ejemplo n.º 9
0
 public static void GetMachineName()
 {
     Speaker.Speak("Nome do computador " + Environment.MachineName.ToString());
 }
Ejemplo n.º 10
0
        // Método do evento do reconhecimento
        private void reconhecido(object s, SpeechRecognizedEventArgs e) // passamos a classe EventArgs SpeechRecognized
        {
            string speech     = e.Result.Text;                          // criamos uma variável que contêm a palavra ou frase reconhecida
            double confidence = e.Result.Confidence;                    // criamos uma variável para a confiança

            if (confidence > 0.4)                                       // pegar o resultado da confiança, se for maior que 35% faz algo
            {
                label1.Text = "Reconhecido:\n" + speech;                // mostrar o que foi reconhecido

                foreach (RecognizedPhrase phrase in e.Result.Alternates)
                {
                    listBox1.Items.Add(phrase.Text);
                }

                switch (e.Result.Grammar.Name)            // vamos usar o nome da gramática para executar as ações
                {
                case "Chats":                             // caso for uma conversa
                    Conversation.SaySomethingFor(speech); // vamos usar a classe que faz algo sobre
                    break;

                case "Dumme":
                    if (DummeIn.InStartingConversation.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutStartingConversation.Count);
                        Speaker.Speak(DummeOut.OutStartingConversation[randIndex]);
                    }
                    else if (DummeIn.InQuestionForDumme.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutQuestionForDumme.Count);
                        Speaker.Speak(DummeOut.OutQuestionForDumme[randIndex]);
                    }
                    else if (DummeIn.InDoWork.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutDoWork.Count);
                        Speaker.Speak(DummeOut.OutDoWork[randIndex]);
                    }
                    else if (DummeIn.InDummeStatus.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutDummeStatus.Count);
                        Speaker.Speak(DummeOut.OutDummeStatus[randIndex]);
                    }
                    else if (DummeIn.InJarvis.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutJarvis.Count);
                        Speaker.Speak(DummeOut.OutJarvis[randIndex]);
                    }
                    break;

                case "Commands":
                    if (speech == "até mais jarvis")
                    {
                        ExitNow();     // chama oo método
                    }
                    else if (speech == "minimizar a janela principal")
                    {
                        MinimizeWindow();     // minimizar
                    }
                    else if (speech == "mostrar janela principal")
                    {
                        BackWindowToNormal();     // mostrar janela principal
                    }
                    else
                    {
                        Commands.Execute(speech);
                    }
                    break;

                case "Jokes":
                    break;

                case "Calculations":
                    Calculations.DoCalculation(speech);
                    break;

                case "Process":
                    ProcessControl.OpenOrClose(speech);
                    break;

                case "Sites":     // caso sites
                    string[] replaces = { "abrir", "iniciar", "carregar", "ir para o" };
                    string   site     = "";
                    for (int i = 0; i < replaces.Length; i++)
                    {
                        if (speech.StartsWith(replaces[i]))     // verifica se string começa com um destes, se sim remove ele.
                        {
                            site = speech.Replace(replaces[i], "");
                        }
                    }
                    site = site.Trim();
                    foreach (KeyValuePair <string, string> entry in dictCmdSites)
                    {
                        if (entry.Key == site)
                        {
                            Speaker.SpeakOpenningProcess(site);
                            Process.Start(entry.Value);
                        }
                    }
                    break;

                case "Control":
                    motionDetection = new MotionDetection();
                    motionDetection.Show();
                    break;

                case "Search":
                    string[] parts = speech.Split(' ');
                    string   text  = "";
                    for (int k = 0; k < parts.Length; k++)
                    {
                        if (System.Text.RegularExpressions.Regex.IsMatch(parts[k], "[A-Z]"))
                        {
                            text += parts[k] + " ";
                        }
                    }
                    if (speech.ToLower().EndsWith("youtube"))
                    {
                        if (speech.Contains(" "))
                        {
                            speech = speech.Replace(" ", "+");
                        }
                        Speaker.SpeakRand("certo pesquisando " + text + " no youtube", "tudo bem", "okei, buscando por " + text);
                        loadPage();
                        webLoader.Start("https://www.youtube.com/results?search_query=" + text);
                    }
                    else if (speech.ToLower().EndsWith("google"))
                    {
                        if (speech.Contains(" "))
                        {
                            speech = speech.Replace(" ", "+");
                        }
                        Speaker.SpeakRand("certo pesquisando " + text + " no google", "tudo bem", "okei, buscando por " + text,
                                          "okei, buscando por " + text + " no google");
                        loadPage();
                        webLoader.Start("http://images.google.com/images?q=" + text + "&start=900&filter=1");
                    }
                    break;

                default:                                       // caso padrão
                    Speaker.Speak(AIML.GetOutputChat(speech)); // pegar resposta
                    break;
                }
            }
        }
Ejemplo n.º 11
0
 public static void GetOSVersion()
 {
     System.OperatingSystem infoOS = System.Environment.OSVersion;
     Speaker.Speak("versão do sistema operacional " + infoOS.ToString());
 }
Ejemplo n.º 12
0
 // nome do usuário
 public static void GetUserName()
 {
     Speaker.Speak("Nome do usuário " + Environment.UserName.ToString());
 }
Ejemplo n.º 13
0
        public static void Execute(string cmd)             // método estático
        {
            DateTime time = DateTime.Now;

            switch (cmd)
            {
            case "que horas são":     // fala as horas

                if (time.Hour <= 12 && time.Hour > 5)
                {
                    Speaker.Speak("são " + time.Hour.ToString() + " horas da manhã e " + time.Minute.ToString() + " minutos");
                }
                else if (time.Hour > 12 && time.Hour < 18)
                {
                    int h = time.Hour - 12;
                    Speaker.Speak("são " + h.ToString() + " horas da tarde e " + time.Minute.ToString() + " minutos");
                }
                else if (time.Hour > 18 && time.Hour < 24)
                {
                    int h = time.Hour - 12;
                    Speaker.Speak("são " + h + " horas da noite e " + time.Minute.ToString() + "minutos");
                }
                else
                {
                    Speaker.Speak("são " + time.Hour.ToString() + " horas " + time.Minute.ToString() + " minutos");
                }
                break;

            case "data de hoje":
                Speaker.Speak(DateTime.Now.ToShortDateString());
                break;

            case "que dia é hoje":
                Speaker.Speak(DateTime.Today.ToString("dddd"));
                break;

            case "em que mês estamos":
                // vamos usar switch para pegar o nome do mes
                string month = "";
                int    n     = time.Month;
                switch (n)
                {
                case 1:
                    month = "janeiro";
                    break;

                case 2:
                    month = "fevereiro";
                    break;

                case 3:
                    month = "março";
                    break;

                case 4:
                    month = "abril";
                    break;

                case 5:
                    month = "maio";
                    break;

                case 6:
                    month = "junho";
                    break;

                case 7:
                    month = "julho";
                    break;

                case 8:
                    month = "agosto";
                    break;

                case 9:
                    month = "setembro";
                    break;

                case 10:
                    month = "outubro";
                    break;

                case 11:
                    month = "novembro";
                    break;

                case 12:
                    month = "dezembro";
                    break;
                }
                Speaker.Speak("estamos no mês de " + month);
                break;

            case "em que ano estamos":
                Speaker.Speak(DateTime.Today.ToString("yyyy"));
                break;

            // SpeechSynthesizer
            case "pare de falar":
                Speaker.StopSpeak();         // para de falar
                break;

            // media player
            case "media player":
                if (mediaPlayer != null)
                {
                    mediaPlayer.Show();
                    Speaker.Speak("abrindo media player");
                }
                else
                {
                    mediaPlayer = new MediaPlayer();
                    mediaPlayer.Show();
                    Speaker.Speak("abrindo media player");
                }
                break;

            case "selecionar arquivo para o media player":
                if (mediaPlayer != null)
                {
                    mediaPlayer.Show();
                    mediaPlayer.OpenFile();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "pausar":
                if (mediaPlayer != null)
                {
                    mediaPlayer.Pause();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "continuar":
                if (mediaPlayer != null)
                {
                    mediaPlayer.Play();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "parar":
                if (mediaPlayer != null)
                {
                    mediaPlayer.Stop();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "fechar media player":
                if (mediaPlayer != null)
                {
                    mediaPlayer.Close();
                    mediaPlayer = null;
                    Speaker.Speak("fechando o media player");
                }
                break;

            case "abrir diretório para reproduzir":
                if (mediaPlayer != null)
                {
                    mediaPlayer.OpenDirectory();
                    mediaPlayer.Show();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "próximo":
                if (mediaPlayer != null)
                {
                    mediaPlayer.NextFile();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "anterior":
                if (mediaPlayer != null)
                {
                    mediaPlayer.BackFile();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "aumentar volume do media player":
                if (mediaPlayer != null)
                {
                    mediaPlayer.VolumeUp();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "diminuir volume do media player":
                if (mediaPlayer != null)
                {
                    mediaPlayer.VolumeDown();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "media player sem som":
                if (mediaPlayer != null)
                {
                    mediaPlayer.Mute();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "media player com som":
                if (mediaPlayer != null)
                {
                    mediaPlayer.UnMute();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "media player em tela cheia":
                if (mediaPlayer != null)
                {
                    mediaPlayer.FullScreen();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "que arquivo está tocando":
                if (mediaPlayer != null)
                {
                    mediaPlayer.SayFileThatIsPlaying();
                }
                else
                {
                    Speaker.Speak("media player, não está aberto!");     // diz algo
                }
                break;

            case "reproduza algum vídeo":
                if (mediaPlayer != null)
                {
                    mediaPlayer.PlayDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos));
                }
                else
                {
                    mediaPlayer = new MediaPlayer();
                    mediaPlayer.PlayDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos));
                }
                mediaPlayer.Show();
                Speaker.SpeakRand("vou reproduzir algum vídeo", "como quiser");
                break;

            case "reproduza alguma música":
                if (mediaPlayer != null)
                {
                    mediaPlayer.PlayDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic));
                }
                else
                {
                    mediaPlayer = new MediaPlayer();
                    mediaPlayer.PlayDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic));
                }
                mediaPlayer.Show();
                Speaker.SpeakRand("okay", "tudo bem, vou tocar algo", "certo, vou fazer isso", "como quiser");
                break;

            // Comandos
            case "adicionar novo comando":
                if (addNewCommand == null)
                {
                    addNewCommand = new AddNewCommand();
                    addNewCommand.Show();
                }
                else
                {
                    Speaker.Speak("certo, vou abrir");
                    addNewCommand.Show();
                }
                break;

            case "detalhes dos processos":
                ProcessControl.ProcessesRunning();     // chama o método
                break;

            case "introdução ao assistente jarvis":
                JARVISHelp.Introduction();
                break;

            case "lista de processos":
                if (processList == null)
                {
                    processList = new ProcessList();
                    processList.Show();
                }
                else
                {
                    processList.Show();
                }
                break;

            case "fechar o processo selecionado":
                if (processList != null)
                {
                    processList.CloseSelectedProcess();
                }
                break;


            // informações do sistema
            case "em quanto estar o uso do processador?":
                Speaker.Speak("o uso do processador estar em " + Math.Round(PCStats.GetCPUUsage(), 2).ToString() + " porcento");
                break;

            case "quanta memória ram estar sendo usada?":
                Speaker.Speak("estão sendo usados " + ((int)PCStats.GetTotalMemory() - PCStats.GetFreeMemory()).ToString() + " megas baites de memória ram");
                break;

            case "quanta mamória ram ainda há livre?":
                Speaker.Speak("há " + (int)PCStats.GetFreeMemory() + " megas baites de memória ram livres");
                break;

            case "quanta memória ram há no total?":
                Speaker.Speak("há " + (int)PCStats.GetTotalMemory() + " megas baites de memória ram no total");
                break;

            case "estou com sono":
                Speaker.Speak("o senhor deveria ir dormir, estarei disponível quando o senhor voltar");
                break;

            case "estou indo dormir":
                Speaker.SpeakSync("certo, sendo assim também estou indo dormir,... até mais senhor");
                Environment.Exit(0);     // outra forma de fechar o form, mas também tem o objeto.Close()
                break;


            case "desligar computador":
                SpecialCommands.ShutdownComputer();
                break;

            case "reiniciar computador":
                SpecialCommands.RestartComputer();
                break;

            case "cancelar desligamento":
            case "cancelar reinicialização":
                SpecialCommands.CancelShutdown();
                break;

            case "previsão do tempo":
                string temp = Weather.GetConditions();
                Speaker.Speak("temperatura é de " + temp);
                break;

            // controle de janelas
            case "alterar de janela":
                windowCounter++;
                SendKeys.Send("%{TAB " + windowCounter + "}");
                Speaker.Speak("alterando de janela");
                break;

            case "fechar janela":
                SendKeys.Send("%{F4}");
                Speaker.Speak("fechando janela");
                break;

            // comandos de teclas
            case "copiar texto selecionado":
                SendKeys.Send("^{C}");
                Speaker.Speak("copiado");
                break;

            case "colar texto selecionado":
                SendKeys.Send("^{V}");
                Speaker.Speak("colado");
                break;

            case "salvar este arquivo":
                SendKeys.Send("^{S}");
                Speaker.Speak("escreva um nome para o arquivo e salve-o");
                break;

            case "selecionar tudo":
                SendKeys.Send("^{A}");
                Speaker.Speak("selecionando todo o texto!");
                break;

            case "nova linha":
                SendKeys.Send("{ENTER}");
                Speaker.Speak("indo para nova linha");
                break;

            // Comandos do programa
            case "exibir lista de comandos":
                break;
            }
        }
 private void pictureBox4_Click(object sender, EventArgs e)
 {
     Speaker.SpeakOpenningProcess("media player classic");
     Process.Start(@"C:\Program Files\MPC-HC\mpc-hc.exe");
 }
Ejemplo n.º 15
0
 // Sair do jarvis
 private void ExitNow()
 {
     Speaker.SpeakSync("certo, até mais, senhor!"); // diz algo
     this.Close();                                  // fecha tudo o que é do jarvis
 }
 private void pictureBox5_Click(object sender, EventArgs e)
 {
     Speaker.SpeakOpenningProcess("vlc media player");
     Process.Start(@"C:\Program Files\VideoLAN\VLC\vlc.exe");
 }
Ejemplo n.º 17
0
 private void trackBar1_Scroll(object sender, EventArgs e)
 {
     trackBar1.Maximum = 20;
     Speaker.SetVolume(trackBar1.Value * 5);
 }
Ejemplo n.º 18
0
 // Método pause
 public void Pause()
 {
     axWindowsMediaPlayer1.Ctlcontrols.pause(); // pausa
     Speaker.Speak("pausando a reprodução");
 }
Ejemplo n.º 19
0
 private void button1_Click(object sender, EventArgs e)
 {
     Speaker.SetVoice(comboBox1.SelectedItem.ToString());
     Speaker.Speak("A voz  foi alterada com sucesso", "Voz modificada com sucesso");
 }
Ejemplo n.º 20
0
 // Controle dos loops
 public void NextFile()
 {
     axWindowsMediaPlayer1.Ctlcontrols.next(); // próximo arquivo
     Speaker.Speak("indo para o próximo");
 }
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     Speaker.SpeakOpenningProcess("google");
     Process.Start("http://www.google.com");
 }
Ejemplo n.º 22
0
 public void VolumeUp()
 {
     axWindowsMediaPlayer1.settings.volume += 10;
     Speaker.SayWithStatus("aumentado o volume do media player");
 }
 private void AppsDialog_Load(object sender, EventArgs e)
 {
     Speaker.SpeakOpenningProcess("janela de sites e aplicativos");
 }
Ejemplo n.º 24
0
 public void Mute()
 {
     axWindowsMediaPlayer1.settings.mute = true;
     Speaker.SayWithStatus("deixando o media player mudo");
 }
 private void pictureBox2_Click(object sender, EventArgs e)
 {
     Speaker.SpeakOpenningProcess("youtube");
     Process.Start("http://www.youtube.com");
 }
Ejemplo n.º 26
0
 // Método play
 public void Play()
 {
     axWindowsMediaPlayer1.Ctlcontrols.play(); // método play
     Speaker.Speak("reproduzindo arquivo!");
 }
Ejemplo n.º 27
0
        // Método do evento do reconhecimento
        private void reconhecido(object s, SpeechRecognizedEventArgs e) // passamos a classe EventArgs SpeechRecognized
        {
            string speech     = e.Result.Text;                          // criamos uma variável que contêm a palavra ou frase reconhecida
            double confidence = e.Result.Confidence;                    // criamos uma variável para a confiança

            if (confidence > 0.4)                                       // pegar o resultado da confiança, se for maior que 35% faz algo
            {
                label1.Text = "Reconhecido:\n" + speech;                // mostrar o que foi reconhecido


                switch (e.Result.Grammar.Name)            // vamos usar o nome da gramática para executar as ações
                {
                case "Chats":                             // caso for uma conversa
                    Conversation.SaySomethingFor(speech); // vamos usar a classe que faz algo sobre
                    break;

                case "Dumme":
                    if (DummeIn.InStartingConversation.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutStartingConversation.Count);
                        Speaker.Speak(DummeOut.OutStartingConversation[randIndex]);
                    }
                    else if (DummeIn.InQuestionForDumme.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutQuestionForDumme.Count);
                        Speaker.Speak(DummeOut.OutQuestionForDumme[randIndex]);
                    }
                    else if (DummeIn.InDoWork.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutDoWork.Count);
                        Speaker.Speak(DummeOut.OutDoWork[randIndex]);
                    }
                    else if (DummeIn.InDummeStatus.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutDummeStatus.Count);
                        Speaker.Speak(DummeOut.OutDummeStatus[randIndex]);
                    }
                    else if (DummeIn.InJarvis.Any(x => x == speech))
                    {
                        int randIndex = rnd.Next(0, DummeOut.OutJarvis.Count);
                        Speaker.Speak(DummeOut.OutJarvis[randIndex]);
                    }
                    break;

                case "Commands":
                    switch (speech)
                    {
                    case "quais são as notícias":
                        newsFromG1 = G1FeedNews.GetNews();
                        Speaker.Speak("Já carreguei as notícias");
                        break;

                    case "próxima notícia":
                        Speaker.Speak("Título da notícia.. " + newsFromG1[newsIndex].Title
                                      + " .. " + newsFromG1[newsIndex].Text);
                        newsIndex++;
                        break;
                    }
                    if (speech == "até mais jarvis")
                    {
                        ExitNow();     // chama oo método
                    }
                    else if (speech == "minimizar a janela principal")
                    {
                        MinimizeWindow();     // minimizar
                    }
                    else if (speech == "mostrar janela principal")
                    {
                        BackWindowToNormal();     // mostrar janela principal
                    }
                    else
                    {
                        Commands.Execute(speech);
                    }
                    break;

                case "Jokes":
                    break;

                case "Calculations":
                    Calculations.DoCalculation(speech);
                    break;

                case "Process":
                    ProcessControl.OpenOrClose(speech);
                    break;

                case "Control":
                    motionDetection = new MotionDetection();
                    motionDetection.Show();
                    break;

                default:                                       // caso padrão
                    Speaker.Speak(AIML.GetOutputChat(speech)); // pegar resposta
                    break;
                }
            }
        }