コード例 #1
0
 private async void HubConnector_TTSResponseDelegate(string user, string message)
 {
     if (!string.IsNullOrEmpty(message))
     {
         while (Audio.IsPlaying)
         {
             await Task.Delay(100);
         }
         lastTTS = message;
         Audio.PlayBase64(lastTTS);
         if (firstLoad)
         {
             firstLoad = false;
             Conversations.Add(new Conversation {
                 IsAI = true, Message = CurrentSpeech
             });
         }
     }
 }