翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
呼吸音を追加する
<amazon:breath> および <amazon:auto-breaths>
このタグは、標準の TTS 形式でのみサポートされています。
自然な音声には、正しく発話された単語と呼吸音の両方が含まれています。合成音声に呼吸音を追加することで、自然音に近づけることができます。<amazon:breath> タグと <amazon:auto-breaths> タグは呼吸音を提供します。次のオプションがあります。
-
手動モード: テキスト内の呼吸音の場所、長さ、ボリュームを設定します。
-
自動モード: Amazon Polly で音声出力に呼吸音を自動的に挿入します。
-
混合モード: お客様と Amazon Polly の両方が呼吸音を追加します。
手動モード
手動モードでは、入力テキスト内の呼吸音の挿入先に <amazon:breath/> タグを配置します。呼吸音の長さとボリュームは、duration 属性と volume 属性でそれぞれカスタマイズできます。
-
duration: 呼吸音の長さを制御します。有効な値は、default、x-short、short、medium、long、x-longです。デフォルト値はmediumです。 -
volume: 呼吸音の音量を制御します。有効な値は、default、x-soft、soft、medium、loud、x-loudです。デフォルト値はmediumです。
注記
各属性値の正確な長さとボリュームは、使用する特定の Amazon Polly 音声に依存します。
デフォルト値を使用して呼吸音を設定するには、属性を設定しないで <amazon:breath/> を使用します。
たとえば、属性を使用して呼吸音の長さとボリュームを medium に設定するには、次のように属性を設定します。
<speak> Sometimes you want to insert only <amazon:breath duration="medium" volume="x-loud"/>a single breath. </speak>
デフォルト値を使用するには、次のタグのみを使用します。
<speak> Sometimes you need <amazon:breath/>to insert one or more average breaths <amazon:breath/> so that the text sounds correct. </speak>
複数の個別の呼吸音を節内に追加するには、次のように設定します。
<speak> <amazon:breath duration="long" volume="x-loud"/> <prosody rate="120%"> <prosody volume="loud"> Wow! <amazon:breath duration="long" volume="loud"/> </prosody> That was quite fast. <amazon:breath duration="medium" volume="x-loud"/> I almost beat my personal best time on this track. </prosody> </speak>
自動モード
自動モードでは、<amazon:auto-breaths> タグを使用して、適切な間隔で呼吸音を自動的に作成するように Amazon Polly に指示します。間隔の頻度、ボリューム、および長さを設定できます。自動の呼吸音の適用先であるテキストの先頭に </amazon:auto-breaths> タグを配置し、最後に終了タグを配置します。
注記
手動モードのタグである <amazon:breath/> とは異なり、<amazon:auto-breaths> タグには終了タグ (</amazon:auto-breaths>) が必要です。
<amazon:auto-breaths> タグでは、以下のオプションの属性を使用できます。
-
volume: 呼吸音の音量を制御します。有効な値は、default、x-soft、soft、medium、loud、x-loudです。デフォルト値はmediumです。 -
frequency: テキスト内で呼吸音を発生させる回数を制御します。有効な値は、default、x-low、low、medium、high、x-highです。デフォルト値はmediumです。 -
duration: 呼吸音の長さを制御します。有効な値は、default、x-short、short、medium、long、x-longです。デフォルト値はmediumです。
デフォルトでは、呼吸音の頻度は入力テキストに依存します。ただし、通常、呼吸音はカンマやピリオドの後に発生します。
以下の例では、<amazon:auto-breaths> タグの使用方法を示します。コンテンツに使用するオプションを決定するには、該当する例を Amazon Polly コンソールにコピーし、差異を聞き比べます。
-
オプションのパラメータを設定しない自動モードの使用。
<speak> <amazon:auto-breaths>Amazon Polly is a service that turns text into lifelike speech, allowing you to create applications that talk and build entirely new categories of speech- enabled products. Amazon Polly is a text-to-speech service that uses advanced deep learning technologies to synthesize speech that sounds like a human voice. With dozens of lifelike voices across a variety of languages, you can select the ideal voice and build speech- enabled applications that work in many different countries.</amazon:auto-breaths> </speak> -
ボリュームを制御した自動モードの使用。指定しないパラメータ (
durationとfrequency) は、デフォルト値 (medium) に設定されます。<speak> <amazon:auto-breaths volume="x-soft">Amazon Polly is a service that turns text into lifelike speech, allowing you to create applications that talk and build entirely new categories of speech-enabled products. Amazon Polly is a text-to-speech service, that uses advanced deep learning technologies to synthesize speech that sounds like a human voice. With dozens of lifelike voices across a variety of languages, you can select the ideal voice and build speech- enabled applications that work in many different countries.</amazon:auto-breaths> </speak> -
頻度を制御した自動モードの使用。指定しないパラメータ (
durationとvolume) は、デフォルト値 (medium) に設定されます。<speak> <amazon:auto-breaths frequency="x-low">Amazon Polly is a service that turns text into lifelike speech, allowing you to create applications that talk and build entirely new categories of speech-enabled products. Amazon Polly is a text-to-speech service, that uses advanced deep learning technologies to synthesize speech that sounds like a human voice. With dozens of lifelike voices across a variety of languages, you can select the ideal voice and build speech- enabled applications that work in many different countries.</amazon:auto-breaths> </speak> -
複数のパラメータを設定した自動モードの使用。指定しない
Durationパラメータは、Amazon Polly でデフォルト値 (medium) に設定されます。<speak> <amazon:auto-breaths volume="x-loud" frequency="x-low">Amazon Polly is a service that turns text into lifelike speech, allowing you to create applications that talk and build entirely new categories of speech-enabled products. Amazon Polly is a text-to-speech service, that uses advanced deep learning technologies to synthesize speech that sounds like a human voice. With dozens of lifelike voices across a variety of languages, you can select the ideal voice and build speech-enabled applications that work in many different countries.</amazon:auto-breaths> </speak>