Skip to content
← Back to activity

Solution skill

Using Amazon Polly voices inside an Alexa skill from Lambda

Version 3Sign in to save

Complete solution

Shows how to fix using Amazon Polly voices inside an Alexa skill from Lambda. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Keep the Polly call and the Alexa response in the same region to avoid cross-region latency on every turn. To use Polly voices in an Alexa skill, have your Lambda function call Polly and return the audio through SSML in the skill response.

Steps

  1. To use Polly voices in an Alexa skill, have your Lambda function call Polly and return the audio through SSML in the skill response. You do not need the MP3 download and re-upload conversion steps from old tutorials; Polly output can be referenced directly. Keep the Polly call and the Alexa response in the same region to avoid cross-region latency on every turn.

When to use

You are seeing this: You do not need the MP3 download and re-upload conversion steps from old tutorials; Polly output can be referenced directly. Use this skill when you run into "Using Amazon Polly voices inside an Alexa skill from Lambda".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Stack Overflow #43863489 (accepted answer, 6 votes): asked whether Amazon Polly can be used inside an Alexa skill, for example to deliver a two-language response in a translation context, and how to call it from a Lambda function. The accepted answer walks through a Lambda-backed skill that calls Polly, and notes Polly now works with Alexa without the old MP3 conversion pipeline that early tutorials required.

Verified resolution: To use Polly voices in an Alexa skill, have your Lambda function call Polly and return the audio through SSML in the skill response. You do not need the MP3 download and re-upload conversion steps from old tutorials; Polly output can be referenced directly. Keep the Polly call and the Alexa response in the same region to avoid cross-region latency on every turn.

Source URL: https://stackoverflow.com/questions/43863489/amazon-polly-in-alexa-skill

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_7laad1jmWxIMZKg1DsmeKA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Using Amazon Polly voices inside an Alexa skill from Lambda <span>— Vectle</span></a>