Amazon Polly · Arazzo Workflow

Amazon Polly Replace Lexicon and Re-synthesize

Version 1.0.0

Overwrite an existing lexicon, confirm the change, then re-synthesize speech with it.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Artificial IntelligenceMachine-LearningSpeech SynthesisText-to-SpeechTTSVoiceSSMLNeural EngineGenerative AIArazzoWorkflows

Provider

amazon-polly

Workflows

replace-lexicon-resynthesize
Read, overwrite, verify a lexicon, then re-synthesize speech applying it.
Reads the existing lexicon, overwrites it with a new PLS body, confirms the replacement, and re-synthesizes the supplied text with the updated lexicon applied.
4 steps inputs: amzDate, authorization, content, contentSha256, lexiconName, outputFormat, securityToken, text, voiceId outputs: lexiconName, requestCharacters
1
readCurrent
Read the current lexicon to capture its attributes before replacing it.
2
overwriteLexicon
Overwrite the lexicon with the new PLS body under the same name.
3
confirmReplacement
Read the lexicon back to confirm the replacement is stored.
4
resynthesize
Re-synthesize the supplied text with the replaced lexicon applied so the audio reflects the updated pronunciations.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon Polly Replace Lexicon and Re-synthesize
  summary: Overwrite an existing lexicon, confirm the change, then re-synthesize speech with it.
  description: >-
    Demonstrates updating a custom pronunciation and re-rendering audio. The
    workflow reads the current lexicon with GetLexicon, overwrites it with a new
    PLS body via PutLexicon, reads it back to confirm the replacement, and then
    re-synthesizes the input text with SynthesizeSpeech so the audio reflects the
    updated pronunciations. Each step spells out its request inline, including
    the AWS Signature Version 4 signing headers, so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: lexiconsApi
  url: ../openapi/amazon-polly-lexicons-api-openapi.yml
  type: openapi
- name: speechApi
  url: ../openapi/amazon-polly-speech-api-openapi.yml
  type: openapi
workflows:
- workflowId: replace-lexicon-resynthesize
  summary: Read, overwrite, verify a lexicon, then re-synthesize speech applying it.
  description: >-
    Reads the existing lexicon, overwrites it with a new PLS body, confirms the
    replacement, and re-synthesizes the supplied text with the updated lexicon
    applied.
  inputs:
    type: object
    required:
    - lexiconName
    - content
    - amzDate
    - authorization
    - text
    - outputFormat
    - voiceId
    properties:
      lexiconName:
        type: string
        description: Case-sensitive alphanumeric lexicon name (1-20 chars).
      content:
        type: string
        description: The replacement PLS lexicon content as a string.
      amzDate:
        type: string
        description: The X-Amz-Date timestamp used to sign the requests.
      authorization:
        type: string
        description: The full SigV4 Authorization header value for the request.
      contentSha256:
        type: string
        description: The X-Amz-Content-Sha256 hex digest of the request payload.
      securityToken:
        type: string
        description: Optional X-Amz-Security-Token for temporary credentials.
      text:
        type: string
        description: The input text (plain text or SSML) to synthesize.
      outputFormat:
        type: string
        description: The audio output format (mp3, ogg_vorbis, pcm, or json).
      voiceId:
        type: string
        description: Voice ID to use for the synthesis (e.g. Joanna).
  steps:
  - stepId: readCurrent
    description: Read the current lexicon to capture its attributes before replacing it.
    operationId: GetLexicon
    parameters:
    - name: LexiconName
      in: path
      value: $inputs.lexiconName
    - name: X-Amz-Date
      in: header
      value: $inputs.amzDate
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Amz-Content-Sha256
      in: header
      value: $inputs.contentSha256
    - name: X-Amz-Security-Token
      in: header
      value: $inputs.securityToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      previousAttributes: $response.body#/LexiconAttributes
  - stepId: overwriteLexicon
    description: Overwrite the lexicon with the new PLS body under the same name.
    operationId: PutLexicon
    parameters:
    - name: LexiconName
      in: path
      value: $inputs.lexiconName
    - name: X-Amz-Date
      in: header
      value: $inputs.amzDate
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Amz-Content-Sha256
      in: header
      value: $inputs.contentSha256
    - name: X-Amz-Security-Token
      in: header
      value: $inputs.securityToken
    requestBody:
      contentType: application/json
      payload:
        Content: $inputs.content
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $statusCode
  - stepId: confirmReplacement
    description: Read the lexicon back to confirm the replacement is stored.
    operationId: GetLexicon
    parameters:
    - name: LexiconName
      in: path
      value: $inputs.lexiconName
    - name: X-Amz-Date
      in: header
      value: $inputs.amzDate
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Amz-Content-Sha256
      in: header
      value: $inputs.contentSha256
    - name: X-Amz-Security-Token
      in: header
      value: $inputs.securityToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      lexiconName: $response.body#/Lexicon/Name
      updatedAttributes: $response.body#/LexiconAttributes
  - stepId: resynthesize
    description: >-
      Re-synthesize the supplied text with the replaced lexicon applied so the
      audio reflects the updated pronunciations.
    operationId: SynthesizeSpeech
    parameters:
    - name: X-Amz-Date
      in: header
      value: $inputs.amzDate
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Amz-Content-Sha256
      in: header
      value: $inputs.contentSha256
    - name: X-Amz-Security-Token
      in: header
      value: $inputs.securityToken
    requestBody:
      contentType: application/json
      payload:
        LexiconNames:
        - $inputs.lexiconName
        OutputFormat: $inputs.outputFormat
        Text: $inputs.text
        VoiceId: $inputs.voiceId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      contentType: $response.body#/ContentType
      requestCharacters: $response.body#/RequestCharacters
  outputs:
    lexiconName: $steps.confirmReplacement.outputs.lexiconName
    requestCharacters: $steps.resynthesize.outputs.requestCharacters

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/amazon-polly-replace-lexicon-resynthesize-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.