Exemple #1
0
 private static void AddConsoleMessage(SpeechMessage message)
 {
     if (speechFilter.IsPassing(message.Text))
     {
         Console.Important(message.Text);
     }
     else
     {
         Console.Info(message.Text);
     }
 }
Exemple #2
0
        private static void HandleSpeechMessagePacket(SpeechMessagePacket packet)
        {
            var message = new SpeechMessage
            {
                Type      = packet.Type,
                Message   = packet.Message,
                Name      = packet.Name,
                SpeakerId = packet.Id
            };

            AddConsoleMessage(message);
        }
Exemple #3
0
        private static void HandleClilocMessage(ClilocMessagePacket packet)
        {
            var message = new SpeechMessage
            {
                Type      = SpeechType.Speech,
                Message   = clilocDictionary.Value.GetString(packet.MessageId.Value),
                Name      = packet.Name,
                SpeakerId = packet.SpeakerId
            };

            AddConsoleMessage(message);
        }