/// <summary> /// function for invoking bot /// </summary> private static void StartVoiceBot() { //get speech converted to text Task <string> response = StartSpeechToText(); Console.WriteLine("You said : " + response.Result); //pass the question to QNA service and retrive response Task <string> answer = GetAnswerFromQnAService(response.Result); //pass back the answer to speeker TextToSpeech textToSpeech = new TextToSpeech(); textToSpeech.CovertTextToSpeechFromMicrophone(answer.Result.ToString()).Wait(); }