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.
This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginPutLexicon and EndPutLexicon.
Namespace: Amazon.Polly
Assembly: AWSSDK.Polly.dll
Version: 3.x.y.z
public virtual Task<PutLexiconResponse> PutLexiconAsync( PutLexiconRequest request, CancellationToken cancellationToken )
Container for the necessary parameters to execute the PutLexicon service method.
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Exception | Condition |
---|---|
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. |
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5