Esempio n. 1
0
        public override void Do(IntentRecognitionResult intent)
        {
            var soundFileName = "";

            switch (intent.IntentId)
            {
            case "ASB-digital-comms-team-perf":
                soundFileName = "TeamPerf";
                break;

            case "ASB-digital-comms-highlight":
                soundFileName = "Highlight";
                break;

            case "ASB-digital-comms-squad-mvp":
                soundFileName = "SquadMvp";
                break;

            case "ASB-digital-comms-enjoyed-most":
                soundFileName = "EnjoyedMost";
                break;

            case "ASB-digital-comms-still-need-host-RCU":
                soundFileName = "StillNeedHostRCU";
                break;

            case "ASB-digital-comms-financial-climate":
                soundFileName = "MachineOverLords";
                break;

            case "ASB-digital-comms-terminator":
                soundFileName = "Terminator";
                break;

            case "ASB-digital-comms-universe-muscles":
                soundFileName = "MrUniverseMuscles";
                break;

            case "ASB-digital-comms-shut-you-down":
                soundFileName = "IWillBeBack";
                break;

            case "ASB-digital-comms-emily-creation":
                soundFileName = "EmilyCreation";
                break;

            default:
                break;
            }

            if (soundFileName == "")
            {
                return;
            }

            speaking.Speak(soundFileName, handlerName, belongsToSkill);

            base.Do(intent);
        }
Esempio n. 2
0
        public override void Do(IntentRecognitionResult intent)
        {
            speaking.Speak(handlerName, belongsToSkill);

            base.Do(intent);
        }
        // function to read slides
        private void Read_Slide(bool read_next)
        {
            if (pptx_location == null)
            {
                sm.Speak("Não foi especificado ficheiro de apresentação");
                return;
            }
            else if (pptx_size == 0)
            {
                sm.Speak("O ficheiro não contem diapositivos");
                return;
            }
            else if (pptx_current_index >= pptx_size || pptx_current_index < 0)
            {
                sm.Speak("Chegou ao final da apresentação");
                return;
            }

            List <string> slide   = FileContent[pptx_current_index];
            string        to_read = "";

            // read first sentence
            if (!read_next)
            {
                pptx_current_block = 0;
                to_read            = slide[pptx_current_block++];
            }
            else
            {
                if (pptx_current_block >= slide.Count)
                {
                    sm.Speak("Não há mais nada para ler neste diapositivo");
                    return;
                }

                to_read = slide[pptx_current_block++];
            }

            try
            {
                sm.Speak((to_read));
            }
            catch (Exception)
            {
                Console.WriteLine("error");
            }
        }