Exemplo n.º 1
0
        //Entry point. If we've heard something we let you know here!
        public static async Task <bool> IncommingVoicePacket(string voicePacket)
        {
            if (!Active && voicePacket == "hi sally")
            {
                Active = true;
            }
            if (Active && voicePacket == "bye sally")
            {
                Active = false;
            }

            if (Active)
            {
                return(await VoiceCommand.ExecuteCommand(voicePacket));
            }
            Kernel.UI.DisplayCmd("Sally is not active. Say 'Hi Sally' to activate her");
            return(false);
        }
Exemplo n.º 2
0
 public static async Task <bool> IncommingVoicePacket(string voicePacket)
 {
     return(await VoiceCommand.ExecuteCommand(voicePacket).ConfigureAwait(false));
 }