Store Lexicon, Start Async Task, and Poll
A 3-step recipe with Amazon Polly. We can help you get access.
Recipe · 3 steps
Store Lexicon, Start Async Task, and Poll
with Amazon Polly
Store a lexicon, start a synthesis task that applies it, and poll to completion.
- Store the PLS lexicon to be applied during the synthesis task.
- Start an asynchronous synthesis task that applies the stored lexicon and writes its output to the supplied S3 bucket.
- Poll the synthesis task by id, branching back to poll again while it is still scheduled or in progress.
What you'll need to have ready
- lexiconName: Case-sensitive alphanumeric lexicon name (1-20 chars).
- content: The PLS lexicon content as a string.
- amzDate: The X-Amz-Date timestamp used to sign the requests.
- authorization: The full SigV4 Authorization header value for the request.
- contentSha256: The X-Amz-Content-Sha256 hex digest of the request payload.
- securityToken: Optional X-Amz-Security-Token for temporary credentials.
- text: The input text (plain text or SSML) to synthesize.
- outputFormat: The audio output format (mp3, ogg_vorbis, pcm, or json).
- outputS3BucketName: The S3 bucket name to which the output file will be saved.
- voiceId: Voice ID to use for the synthesis (e.g. Joanna).
For your developer
Arazzo workflow amazon-polly:lexicon-async-task-poll, 3 operations: PutLexicon → StartSpeechSynthesisTask → GetSpeechSynthesisTask. Specs on APIs.io.