Polly / Client / list_lexicons
list_lexicons#
- Polly.Client.list_lexicons(**kwargs)#
Returns a list of pronunciation lexicons stored in an Amazon Web Services Region. For more information, see Managing Lexicons.
See also: AWS API Documentation
Request Syntax
response = client.list_lexicons( NextToken='string' )
- Parameters:
NextToken (string) – An opaque pagination token returned from previous
ListLexicons
operation. If present, indicates where to continue the list of lexicons.- Return type:
dict
- Returns:
Response Syntax
{ 'Lexicons': [ { 'Name': 'string', 'Attributes': { 'Alphabet': 'string', 'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'|'en-NZ'|'en-ZA'|'ca-ES'|'de-AT'|'yue-CN'|'ar-AE'|'fi-FI'|'en-IE'|'nl-BE'|'fr-BE', 'LastModified': datetime(2015, 1, 1), 'LexiconArn': 'string', 'LexemesCount': 123, 'Size': 123 } }, ], 'NextToken': 'string' }
Response Structure
(dict) –
Lexicons (list) –
A list of lexicon names and attributes.
(dict) –
Describes the content of the lexicon.
Name (string) –
Name of the lexicon.
Attributes (dict) –
Provides lexicon metadata.
Alphabet (string) –
Phonetic alphabet used in the lexicon. Valid values are
ipa
andx-sampa
.LanguageCode (string) –
Language code that the lexicon applies to. A lexicon with a language code such as “en” would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS, and so on.
LastModified (datetime) –
Date lexicon was last modified (a timestamp value).
LexiconArn (string) –
Amazon Resource Name (ARN) of the lexicon.
LexemesCount (integer) –
Number of lexemes in the lexicon.
Size (integer) –
Total size of the lexicon, in characters.
NextToken (string) –
The pagination token to use in the next request to continue the listing of lexicons.
NextToken
is returned only if the response is truncated.
Exceptions
Polly.Client.exceptions.InvalidNextTokenException
Polly.Client.exceptions.ServiceFailureException
Examples
Returns a list of pronunciation lexicons stored in an AWS Region.
response = client.list_lexicons( ) print(response)
Expected Output:
{ 'Lexicons': [ { 'Attributes': { 'Alphabet': 'ipa', 'LanguageCode': 'en-US', 'LastModified': 1478542980.117, 'LexemesCount': 1, 'LexiconArn': 'arn:aws:polly:us-east-1:123456789012:lexicon/example', 'Size': 503, }, 'Name': 'example', }, ], 'ResponseMetadata': { '...': '...', }, }