Looking for how to use this in your app?See Frontend Libraries →
Text to speech
These docs cover Amplify Gen 2. For new web apps, we recommend the latest AWS Amplify, with a simplified CLI and native integrations for databases, storage, and AI models. Get started with the latest AWS Amplify.
Working with the API
Generate an audio buffer for playback from a text input.
import { Predictions } from '@aws-amplify/predictions';
const result = await Predictions.convert({ textToSpeech: { source: { text: textToGenerateSpeech }, voiceId: "Amy" }})To view the complete list of voiceId options refer to Voices in Amazon Polly.