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 AWS 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.


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

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


public abstract PutLexiconResponse PutLexicon(
         PutLexiconRequest 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.


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.


Stores a pronunciation lexicon in an AWS Region.

To save a lexicon

var response = client.PutLexicon(new PutLexiconRequest 
    Content = "file://example.pls",
    Name = "W3C"


Version Information

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

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also