Skip to content

PollyClient.put_lexicon

rboto-polly==0.4.0 · Service index · Types

Model summary (excerpt): 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. Overwriting a lexicon keeps its existing tags. You can specify tags only when you...

Install and imports

python -m pip install "rboto[polly]==0.4.0"
from rboto import PollyClient
from rboto_polly.types import (
    PutLexiconOutput,
)

Signature

async def put_lexicon(
    *,
    name: str,
    content: str,
    tags: dict[str, str] | None = None,
) -> PutLexiconOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
name Yes Name of the lexicon. The name must follow the regular expression format [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.
content Yes Content of the PLS lexicon as string data.
tags No The metadata that you apply to the lexicon to help you categorize and organize it. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. You can't replace the tags of an existing lexicon by overwriting it with PutLexicon.

Output

PutLexiconOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

No fields.

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

PutLexiconOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_polly.exceptions:

InvalidLexiconError, InvalidTagParameterError, LexiconSizeExceededError, MaxLexemeLengthExceededError, MaxLexiconsNumberExceededError, ServiceFailureError, TooManyTagsError, UnsupportedPlsAlphabetError, UnsupportedPlsLanguageError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model