AWS SDK Version 3 for .NET
API Reference

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.

Stores a pronunciation lexicon in an Amazon Web Services Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation.

For more information, see Managing Lexicons.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to PutLexiconAsync.

Namespace: Amazon.Polly
Assembly: AWSSDK.Polly.dll
Version: 3.x.y.z

Syntax

C#
public virtual PutLexiconResponse PutLexicon(
         PutLexiconRequest request
)

Parameters

request
Type: Amazon.Polly.Model.PutLexiconRequest

Container for the necessary parameters to execute the PutLexicon service method.

Return Value


The response from the PutLexicon service method, as returned by Polly.

Exceptions

ExceptionCondition
InvalidLexiconException Amazon Polly can't find the specified lexicon. Verify that the lexicon's name is spelled correctly, and then try again.
LexiconSizeExceededException The maximum size of the specified lexicon would be exceeded by this operation.
MaxLexemeLengthExceededException The maximum size of the lexeme would be exceeded by this operation.
MaxLexiconsNumberExceededException The maximum number of lexicons would be exceeded by this operation.
ServiceFailureException An unknown condition has caused a service failure.
UnsupportedPlsAlphabetException The alphabet specified by the lexicon is not a supported alphabet. Valid values are x-sampa and ipa.
UnsupportedPlsLanguageException The language specified in the lexicon is unsupported. For a list of supported languages, see Lexicon Attributes.

Examples

Stores a pronunciation lexicon in an AWS Region.

To save a lexicon


var client = new AmazonPollyClient();
var response = client.PutLexicon(new PutLexiconRequest 
{
    Content = "file://example.pls",
    Name = "W3C"
});


            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also