Amazon Polly

App · Voice AI · 10 actions

Turn text into lifelike speech with Amazon Polly: create audio files in dozens of voices and languages, get word timings, run long texts to S3, and manage pronunciation lexicons.

Actions

ActionWhat it does
Delete lexiconDelete a pronunciation lexicon.
Get lexiconRead a lexicon's PLS content and its details.
Get speech marksFind when each sentence, word or mouth shape (viseme) of a text would be spoken, in milliseconds - for captions, highlighting or lip-sync.
Get speech synthesis taskCheck a synthesis task's status and, once completed, the S3 address of its file.
List lexiconsList the pronunciation lexicons in the connected region.
List speech synthesis tasksList the synthesis tasks of the last 72 hours, newest first, optionally only those with one status.
List voicesList the voices available in the connected region, with the language, gender and engines of each.
Save lexiconCreate a pronunciation lexicon - how Polly should say names, acronyms or words - or replace the one with the same name.
Speak textTurn text or SSML (up to 3,000 characters) into an audio file.
Start speech synthesis taskSpeak a long text (up to 100,000 characters) in the background, writing the audio file to your S3 bucket.

Delete lexicon

Delete a pronunciation lexicon. There is no undo, and speech that names it will fail until it is recreated.

Inputs

Lexiconlexicon_nametextRequired
The lexicon's name (case-sensitive).

Outputs

resultobject
Example output
{
  "result": {
    "deleted": true,
    "name": "BrandNames"
  }
}

Get lexicon

Read a lexicon's PLS content and its details.

Inputs

Lexiconlexicon_nametextRequired
The lexicon's name (case-sensitive).

Outputs

resultobject
Example output
{
  "result": {
    "alphabet": "ipa",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<lexicon version=\"1.0\" xmlns=\"http://www.w3.org/2005/01/pronunciation-lexicon\" alphabet=\"ipa\" xml:lang=\"en-US\">\n  <lexeme><grapheme>Lodol</grapheme><alias>Low doll</alias></lexeme>\n</lexicon>",
    "language_code": "en-US",
    "last_modified_at": "2026-09-28T09:00:00Z",
    "lexemes_count": 1,
    "lexicon_arn": "arn:aws:polly:us-east-1:123456789012:lexicon/BrandNames",
    "name": "BrandNames",
    "size": 262
  }
}

Get speech marks

Find when each sentence, word or mouth shape (viseme) of a text would be spoken, in milliseconds - for captions, highlighting or lip-sync. Run it with the same voice and engine as the audio.

Inputs

Voicevoice_idtextRequired
The voice to speak in. The list shows each voice's language, gender and the engines it supports; you can also type a voice id such as 'Joanna'.
TexttexttextRequired
The same text (or SSML) that was spoken.
Mark typesspeech_mark_typeslistRequired
Which marks to return. SSML marks need SSML text. Generative voices produce none.One or more of: sentence, word, viseme, ssml (SSML marks). Default: ["word", "sentence"].
Engineenginetext
Must be one the voice supports (shown in the Voice list). Left empty, Polly uses standard, which neural-only voices refuse. Long-form and generative cost more per character.One of: standard (Standard (cheapest, every region)), neural (Neural (more natural)), long-form (Long-form (us-east-1 only)), generative (Generative (most expressive, some regions)). Default: neural.
Text typetext_typetext
Plain text, or SSML for pauses, emphasis and pronunciation. Left empty, text that starts with <speak> is read as SSML.One of: text (Plain text), ssml.
Languagelanguage_codetext
Only for bilingual voices (e.g. Aditi): which of its languages to speak. Leave empty to use the voice's main language.
Lexiconslexicon_nameslist
Pronunciation lexicons to apply, up to 5. Create them with Save lexicon.

Outputs

resultobject
Example output
{
  "result": {
    "character_count": 23,
    "count": 2,
    "marks": [
      {
        "end": 23,
        "start": 0,
        "time": 0,
        "type": "sentence",
        "value": "Mary had a little lamb."
      },
      {
        "end": 4,
        "start": 0,
        "time": 6,
        "type": "word",
        "value": "Mary"
      }
    ],
    "speech_mark_types": [
      "sentence",
      "word"
    ],
    "voice_id": "Joanna"
  }
}

Get speech synthesis task

Check a synthesis task's status and, once completed, the S3 address of its file. Polly keeps tasks for 72 hours.

Inputs

Task idtask_idtextRequired
The task_id from Start speech synthesis task (its output URL also works).

Outputs

resultobject
Example output
{
  "result": {
    "task": {
      "created_at": "2026-09-28T09:15:02.123000Z",
      "engine": "neural",
      "language_code": null,
      "lexicon_names": [],
      "output_format": "mp3",
      "output_uri": "https://s3.us-east-1.amazonaws.com/my-polly-audio/audio/d8a3f1b2-5c4e-4a7b-9f60-2e1d3c4b5a69.mp3",
      "request_characters": 1840,
      "sample_rate": null,
      "sns_topic_arn": null,
      "speech_mark_types": [],
      "status": "completed",
      "status_reason": null,
      "task_id": "d8a3f1b2-5c4e-4a7b-9f60-2e1d3c4b5a69",
      "text_type": "text",
      "voice_id": "Joanna"
    }
  }
}

List lexicons

List the pronunciation lexicons in the connected region.

Inputs

None.

Outputs

resultobject
Example output
{
  "result": {
    "count": 1,
    "lexicons": [
      {
        "alphabet": "ipa",
        "language_code": "en-US",
        "last_modified_at": "2026-09-28T09:00:00Z",
        "lexemes_count": 1,
        "lexicon_arn": "arn:aws:polly:us-east-1:123456789012:lexicon/BrandNames",
        "name": "BrandNames",
        "size": 262
      }
    ],
    "names": [
      "BrandNames"
    ]
  }
}

List speech synthesis tasks

List the synthesis tasks of the last 72 hours, newest first, optionally only those with one status.

Inputs

Statusstatustext
Only tasks with this status.One of: scheduled, inProgress (In progress), completed, failed.
Max resultsmax_resultsnumber
How many tasks per page, 1-100.From 1 to 100.
Next tokennext_tokentext
The 'next_token' from a previous page, to read the next one.

Outputs

resultobject
Example output
{
  "result": {
    "count": 1,
    "has_more": false,
    "next_token": null,
    "tasks": [
      {
        "created_at": "2026-09-28T09:15:02.123000Z",
        "engine": "neural",
        "language_code": null,
        "lexicon_names": [],
        "output_format": "mp3",
        "output_uri": "https://s3.us-east-1.amazonaws.com/my-polly-audio/audio/d8a3f1b2-5c4e-4a7b-9f60-2e1d3c4b5a69.mp3",
        "request_characters": 1840,
        "sample_rate": null,
        "sns_topic_arn": null,
        "speech_mark_types": [],
        "status": "scheduled",
        "status_reason": null,
        "task_id": "d8a3f1b2-5c4e-4a7b-9f60-2e1d3c4b5a69",
        "text_type": "text",
        "voice_id": "Joanna"
      }
    ]
  }
}

List voices

List the voices available in the connected region, with the language, gender and engines of each. Filter by engine or language to find one that fits.

Inputs

Engineenginetext
Only voices that support this engine.One of: standard (Standard (cheapest, every region)), neural (Neural (more natural)), long-form (Long-form (us-east-1 only)), generative (Generative (most expressive, some regions)).
Languagelanguage_codetext
Only voices that speak this language.
Include bilingual voicesinclude_additional_language_codestrue/false
With a language: also list voices that speak it as a second language.

Outputs

resultobject
Example output
{
  "result": {
    "count": 1,
    "voice_ids": [
      "Joanna"
    ],
    "voices": [
      {
        "additional_language_codes": [],
        "gender": "Female",
        "id": "Joanna",
        "language_code": "en-US",
        "language_name": "US English",
        "name": "Joanna",
        "supported_engines": [
          "generative",
          "long-form",
          "neural",
          "standard"
        ]
      }
    ]
  }
}

Save lexicon

Create a pronunciation lexicon - how Polly should say names, acronyms or words - or replace the one with the same name. It can take a few seconds before speech uses the new version.

Inputs

Lexicon namelexicon_nametextRequired
1-20 letters and digits, e.g. 'BrandNames'. An existing name is overwritten.
Lexicon (PLS XML)contenttextRequired
A W3C PLS document, up to 40,000 characters. Alphabet ipa or x-sampa; each <lexeme> maps a <grapheme> to a <phoneme> or an <alias>.

Outputs

resultobject
Example output
{
  "result": {
    "name": "BrandNames",
    "saved": true
  }
}

Speak text

Turn text or SSML (up to 3,000 characters) into an audio file. The file is saved and returned as a download link and document, so a later step can play, attach or send it.

Inputs

Voicevoice_idtextRequired
The voice to speak in. The list shows each voice's language, gender and the engines it supports; you can also type a voice id such as 'Joanna'.
TexttexttextRequired
What to say: plain text, or SSML wrapped in <speak>...</speak>. Up to 3,000 billed characters.
Engineenginetext
Must be one the voice supports (shown in the Voice list). Left empty, Polly uses standard, which neural-only voices refuse. Long-form and generative cost more per character.One of: standard (Standard (cheapest, every region)), neural (Neural (more natural)), long-form (Long-form (us-east-1 only)), generative (Generative (most expressive, some regions)). Default: neural.
Audio formatoutput_formattext
The audio file format. Default MP3.One of: mp3, ogg_vorbis (Ogg Vorbis), ogg_opus (Ogg Opus), pcm (PCM (raw 16-bit mono, not directly playable)), mulaw (mu-law (telephony)), alaw (A-law (telephony)). Default: mp3.
Sample ratesample_ratetext
Leave empty for the voice's default. Must suit the audio format.One of: 8000 (8 kHz (pcm, mulaw, alaw, mp3, ogg_vorbis)), 16000 (16 kHz (pcm, mp3, ogg_vorbis)), 22050 (22.05 kHz (mp3, ogg_vorbis; standard default)), 24000 (24 kHz (mp3, ogg_vorbis; neural default)), 44100 (44.1 kHz (mp3, ogg_vorbis; newer, not every voice)), 48000 (48 kHz (ogg_opus; mp3/ogg_vorbis on newer voices)).
Text typetext_typetext
Plain text, or SSML for pauses, emphasis and pronunciation. Left empty, text that starts with <speak> is read as SSML.One of: text (Plain text), ssml.
Languagelanguage_codetext
Only for bilingual voices (e.g. Aditi): which of its languages to speak. Leave empty to use the voice's main language.
Lexiconslexicon_nameslist
Pronunciation lexicons to apply, up to 5. Create them with Save lexicon.

Outputs

character_countnumber
Characters Polly billed for this request (SSML tags excluded).
content_typetext
Its MIME type, e.g. audio/mpeg.
document_reftext
The stored audio file's reference.
documentslist
The audio file, as a document.
enginetext
The engine requested (empty = standard).
filenametext
Its file name.
output_formattext
The audio format.
sample_ratetext
The sample rate requested, if any.
size_bytesnumber
Its size in bytes.
text_typetext
text or ssml.
urltext
A link to download or play the audio.
voice_idtext
The voice used.
Example output
{
  "character_count": 38,
  "content_type": "audio/mpeg",
  "document_ref": "doc_4c1f7a2b9e0d5a63",
  "documents": [
    {
      "content_type": "audio/mpeg",
      "document_ref": "doc_4c1f7a2b9e0d5a63",
      "filename": "polly-joanna.mp3",
      "size_bytes": 18432,
      "url": "/actions/core/serve-document/doc_4c1f7a2b9e0d5a63?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "engine": "neural",
  "filename": "polly-joanna.mp3",
  "output_format": "mp3",
  "sample_rate": null,
  "size_bytes": 18432,
  "text_type": "text",
  "url": "/actions/core/serve-document/doc_4c1f7a2b9e0d5a63?teamId=6512a1b2c3d4e5f600000001",
  "voice_id": "Joanna"
}

Start speech synthesis task

Speak a long text (up to 100,000 characters) in the background, writing the audio file to your S3 bucket. Use Get speech synthesis task to see when it is done and where the file is.

Inputs

Voicevoice_idtextRequired
The voice to speak in. The list shows each voice's language, gender and the engines it supports; you can also type a voice id such as 'Joanna'.
TexttexttextRequired
What to say: plain text or SSML, up to 100,000 billed characters.
S3 bucketoutput_s3_bucket_nametextRequired
The bucket Polly writes the file to, e.g. 'my-polly-audio' (an s3:// address also works). The access key needs s3:PutObject on it.
S3 key prefixoutput_s3_key_prefixtext
A folder-like prefix for the file name, e.g. 'audio/'. Polly adds the task id and extension.
Engineenginetext
Must be one the voice supports (shown in the Voice list). Left empty, Polly uses standard, which neural-only voices refuse. Long-form and generative cost more per character.One of: standard (Standard (cheapest, every region)), neural (Neural (more natural)), long-form (Long-form (us-east-1 only)), generative (Generative (most expressive, some regions)). Default: neural.
Output formatoutput_formattext
The audio format, or Speech marks (JSON). Default MP3.One of: mp3, ogg_vorbis (Ogg Vorbis), ogg_opus (Ogg Opus), pcm (PCM (raw 16-bit mono, not directly playable)), mulaw (mu-law (telephony)), alaw (A-law (telephony)), json (Speech marks (JSON)). Default: mp3.
Sample ratesample_ratetext
Leave empty for the voice's default.One of: 8000 (8 kHz (pcm, mulaw, alaw, mp3, ogg_vorbis)), 16000 (16 kHz (pcm, mp3, ogg_vorbis)), 22050 (22.05 kHz (mp3, ogg_vorbis; standard default)), 24000 (24 kHz (mp3, ogg_vorbis; neural default)), 48000 (48 kHz (ogg_opus)).
Text typetext_typetext
Plain text, or SSML for pauses, emphasis and pronunciation. Left empty, text that starts with <speak> is read as SSML.One of: text (Plain text), ssml.
Languagelanguage_codetext
Only for bilingual voices (e.g. Aditi): which of its languages to speak. Leave empty to use the voice's main language.
Lexiconslexicon_nameslist
Pronunciation lexicons to apply, up to 5. Create them with Save lexicon.
Mark typesspeech_mark_typeslist
Only with the Speech marks (JSON) format.One or more of: sentence, word, viseme, ssml (SSML marks).
SNS topic ARNsns_topic_arntext
Optional: an SNS topic to notify when the task finishes. The access key needs sns:Publish on it.

Outputs

resultobject
Example output
{
  "result": {
    "task": {
      "created_at": "2026-09-28T09:15:02.123000Z",
      "engine": "neural",
      "language_code": null,
      "lexicon_names": [],
      "output_format": "mp3",
      "output_uri": "https://s3.us-east-1.amazonaws.com/my-polly-audio/audio/d8a3f1b2-5c4e-4a7b-9f60-2e1d3c4b5a69.mp3",
      "request_characters": 1840,
      "sample_rate": null,
      "sns_topic_arn": null,
      "speech_mark_types": [],
      "status": "scheduled",
      "status_reason": null,
      "task_id": "d8a3f1b2-5c4e-4a7b-9f60-2e1d3c4b5a69",
      "text_type": "text",
      "voice_id": "Joanna"
    }
  }
}

On this page