Name:
interface
Value:
Extend your Amplify Gen 2 app with AWS Blocks — self-contained backend capabilities you compose into your existing backend.

Page updated Apr 29, 2024

NewDeploy web apps with Git or your AI coding agent using the latest AWS Amplify. Add managed databases and authentication as you grow. Explore the documentation.
Maintenance ModeYou are viewing Amplify Gen 1 documentation. Amplify Gen 1 has entered maintenance mode and will reach end of life on May 1, 2027. For existing Gen 1 projects, a migration guide and tooling are available to help you upgrade.

Transcribe audio to text

These docs cover Amplify Gen 1. 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.

Set up the backend

If you haven't already done so, run amplify init inside your project and then amplify add auth (we recommend selecting the default configuration).

Run amplify add predictions and select Convert. Then use the following answers:

? What would you like to convert? (Use arrow keys)
Translate text into a different language
Generate speech audio from text
> Transcribe text from audio
? Who should have access? Auth and Guest users

Now run amplify push which will generate your amplifyconfiguration.json and create resources in the cloud. You can now either add this to your backend or skip and add more features to your app.

Services used: Amazon Transcribe

Working with the API

You can transcribe a PCM Audio byte buffer to Text, such as a recording from microphone.

import { Predictions } from '@aws-amplify/predictions';
Predictions.convert({
transcription: {
source: {
bytes
}
// language: "en-US",
}
})
.then(({ transcription: { fullText } }) => console.log({ fullText }))
.catch((err) => console.log({ err }));

To view the complete list of all the supported languages and language specific features refer to the supported languages list. The language data input type has to support streaming for it to work with Amplify Predictions.