AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
This is the response object from the SynthesizeSpeech operation.
Namespace: Amazon.Polly.Model
Assembly: AWSSDK.Polly.dll
Version: 3.x.y.z
public class SynthesizeSpeechResponse : AmazonWebServiceResponse IDisposable
The SynthesizeSpeechResponse type exposes the following members
Name | Description | |
---|---|---|
SynthesizeSpeechResponse() |
Name | Type | Description | |
---|---|---|---|
AudioStream | System.IO.Stream |
Gets and sets the property AudioStream. Stream containing the synthesized speech. |
|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
ContentType | System.String |
Gets and sets the property ContentType.
Specifies the type audio stream. This should reflect the
|
|
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
RequestCharacters | System.Int32 |
Gets and sets the property RequestCharacters. Number of characters synthesized. |
|
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
Name | Description | |
---|---|---|
Dispose() |
Disposes of all managed and unmanaged resources. |
Synthesizes plain text or SSML into a file of human-like speech.
var client = new AmazonPollyClient(); var response = client.SynthesizeSpeech(new SynthesizeSpeechRequest { LexiconNames = new List<string> { "example" }, OutputFormat = "mp3", SampleRate = "8000", Text = "All Gaul is divided into three parts", TextType = "text", VoiceId = "Joanna" }); MemoryStream audioStream = response.AudioStream; string contentType = response.ContentType; int requestCharacters = response.RequestCharacters;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5