public static SynthesizeSpeechResponse SynthesizeSpeech(string textContent, Amazon.Polly.LanguageCode languageCode, string outputFormat = "mp3") { var synteshisRequest = new SynthesizeSpeechRequest { Engine = Engine.Neural, OutputFormat = outputFormat, //SampleRate = "8000", Text = textContent, TextType = "text", VoiceId = VoiceId.Joanna, LanguageCode = languageCode }; var client = new AmazonPollyClient(RegionEndpoint.USEast1); var task = client.SynthesizeSpeechAsync(synteshisRequest); task.Wait(); return(task.Result); }