public void PollyDescribeVoices()
        {
            #region to-describe-available-voices-1482180557753

            var response = client.DescribeVoices(new DescribeVoicesRequest
            {
                LanguageCode = "en-GB"
            });

            List <Voice> voices = response.Voices;

            #endregion
        }
Пример #2
0
 private Amazon.Polly.Model.DescribeVoicesResponse CallAWSServiceOperation(IAmazonPolly client, Amazon.Polly.Model.DescribeVoicesRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Polly", "DescribeVoices");
     try
     {
         #if DESKTOP
         return(client.DescribeVoices(request));
         #elif CORECLR
         return(client.DescribeVoicesAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }