Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.
Gen1 DocsLegacy

Page updated Mar 26, 2026

テキスト音声変換

注: まずはじめにセクションを完了してください。ここでは、適切なポリシーアクションを持つIAMロールをセットアップします。

APIの使用

テキスト入力から再生用のオーディオバッファを生成します。

import { Predictions } from '@aws-amplify/predictions';
const result = await Predictions.convert({
textToSpeech: {
source: {
text: textToGenerateSpeech
},
voiceId: "Amy"
}
})

voiceIdオプションの完全なリストについては、Amazon Pollyの音声を参照してください。