Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
AWSPollyTTS
AWS Polly TTS plugin. Synthesizes speech via Amazon Polly at 24 kHz with support for neural, standard, generative, and long-form voice engines across 60+ voices and 20+ languages.Constructor
AWS secret access key paired with
aws_access_key_id. Falls back to AWS_SECRET_ACCESS_KEY when omitted.Temporary session token for short-lived IAM role credentials (e.g. from
sts:AssumeRole). Omit for long-term credentials. Falls back to AWS_SESSION_TOKEN.AWS access key ID. Falls back to the
AWS_ACCESS_KEY_ID environment variable when omitted.AWS region hosting the Polly endpoint, e.g.
"us-east-1", "eu-west-1", "ap-southeast-1". Defaults to "us-east-1".Polly voice ID to use for synthesis. Defaults to
"Joanna" (US English, female, neural). Other popular options include "Matthew" (US English, male), "Amy" (British English, female), "Brian" (British English, male), "Celine" (French, female). See the AWS Polly voice list <https://docs.aws.amazon.com/polly/latest/dg/voicelist.html>_ for the full catalogue.Polly synthesis engine. One of: *
"neural" (default): high-quality neural TTS; supports a subset of voices. * "standard": concatenative synthesis; broadest voice support. * "generative": generative model for expressive speech; select voices only. * "long-form": optimised for longer text passages; select voices only.Playback rate multiplier (
1.0 = normal). Currently stored but not applied at the Polly API level. Defaults to 1.0.Pitch adjustment in semitones. Currently stored but not applied at the Polly API level. Defaults to
0.0.aclose
emit
The event to emit.
interrupt
off
The event the handler was registered for.
The handler to remove.
on
callback is omitted.
The event to listen for.
The handler to invoke when the event is emitted. If
None, a decorator is returned that registers the decorated function.The registered callback when
callback is provided, otherwise a decorator that registers and returns the function it wraps.on_first_audio_byte
A callable, optionally async, invoked with synthesis timing information when the first audio byte is emitted.
synthesize
The text to synthesize; coerced to a string if needed.