capabilities.work

Replace Lexicon and Re-synthesize

A 4-step recipe with Amazon Polly. We can help you get access.

Recipe · 4 steps

Replace Lexicon and Re-synthesize

Read, overwrite, verify a lexicon, then re-synthesize speech applying it.

  1. Read the current lexicon to capture its attributes before replacing it.
  2. Overwrite the lexicon with the new PLS body under the same name.
  3. Read the lexicon back to confirm the replacement is stored.
  4. Re-synthesize the supplied text with the replaced lexicon applied so the audio reflects the updated pronunciations.
What you'll need to have ready
  • lexiconName: Case-sensitive alphanumeric lexicon name (1-20 chars).
  • content: The replacement 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).
  • voiceId: Voice ID to use for the synthesis (e.g. Joanna).
For your developer

Arazzo workflow amazon-polly:replace-lexicon-resynthesize, 4 operations: GetLexicon → PutLexicon → GetLexicon → SynthesizeSpeech. Specs on APIs.io.