private async Task InitializeHubConnector() { hubConnector = new HubConnector(); hubConnector.TTSResponseDelegate += HubConnector_TTSResponseDelegate; hubConnector.StartAsync(); await Task.Delay(500); CurrentSpeech = "We invite you to experience the future of AI that will empower your employees with disabilities to pick a warehouse order and inspire your team."; Conversations.Add(new Conversation { IsAI = true, Message = CurrentSpeech }); hubConnector.GetText2Speech("XamarinDemoApp", CurrentSpeech); CurrentSpeech = "Are you ready to start picking?"; lastAIText = CurrentSpeech; hubConnector.GetText2Speech("XamarinDemoApp", CurrentSpeech); }
private void ExecuteHelpCommand() { Conversations.Add(new Conversation { IsAI = false, Message = "Help." }); CurrentSpeech = "Ok, no problem! I will send a supervisor to help you."; lastAIText = CurrentSpeech; Conversations.Add(new Conversation { IsAI = true, Message = lastAIText }); hubConnector.GetText2Speech("XamarinDemoApp", CurrentSpeech); }