awsttswrapper

This module contains the following classes:

Please refer to https://aws.amazon.com/polly/ for further details.

Note

This module requires Python module boto3 (pip install boto3).

Warning

You will be billed according to your AWS account plan. Your AWS credentials and configuration settings to access the AWS Polly service must be either stored on disk (e.g., in ~/.aws/credentials and ~/.aws/config) or set in environment variables. Please refer to http://boto3.readthedocs.io/en/latest/guide/configuration.html for further details.

Warning

This module is experimental, use at your own risk.

New in version 1.7.0.

class aeneas.ttswrappers.awsttswrapper.AWSTTSWrapper(rconf=None, logger=None)[source]

A wrapper for the AWS Polly TTS API.

This wrapper supports calling the TTS engine only via Python.

In abstract terms, it performs one or more calls to the AWS Polly TTS API service, and concatenate the resulting WAVE files, returning their anchor times.

To use this TTS engine, specify

"tts=aws"

in the RuntimeConfiguration object.

Your AWS credentials and configuration settings to access the AWS Polly service must be either stored on disk (e.g., in ~/.aws/credentials and ~/.aws/config) or set in environment variables. Please refer to http://boto3.readthedocs.io/en/latest/guide/configuration.html for further details.

You might also want to enable the TTS caching, to reduce the number of API calls

"tts=aws|tts_cache=True"

See BaseTTSWrapper for the available functions. Below are listed the languages supported by this wrapper.

Parameters:
CYM = 'cym'

Welsh

DAN = 'dan'

Danish

DEU = 'deu'

German

ENG = 'eng'

English

ENG_AUS = 'eng-AUS'

English (Australia)

ENG_GBR = 'eng-GBR'

English (GB)

ENG_IND = 'eng-IND'

English (India)

ENG_USA = 'eng-USA'

English (USA)

ENG_WLS = 'eng-WLS'

English (Wales)

FRA = 'fra'

French

FRA_CAN = 'fra-CAN'

French (Canada)

FRA_FRA = 'fra-FRA'

French (France)

ISL = 'isl'

Icelandic

ITA = 'ita'

Italian

JPN = 'jpn'

Japanese

NLD = 'nld'

Dutch

NOR = 'nor'

Norwegian

POL = 'pol'

Polish

POR = 'por'

Portuguese

POR_BRA = 'por-BRA'

Portuguese (Brazil)

POR_PRT = 'por-PRT'

Portuguese (Portugal)

RON = 'ron'

Romanian

RUS = 'rus'

Russian

SAMPLE_FORMAT = 'pcm'

Synthesize 16kHz PCM16 mono

SAMPLE_RATE = 16000

Synthesize 16kHz PCM16 mono

SPA = 'spa'

Spanish

SPA_ESP = 'spa-ESP'

Spanish (Spain)

SPA_USA = 'spa-USA'

Spanish (USA)

SWE = 'swe'

Swedish

TUR = 'tur'

Turkish