Create speech
選択したボイスを使用して、テキストを完全な音声ファイルに変換します。
エンドポイント
パスパラメータ
リクエストボディ
モデル別対応言語
ボイス設定
サポートされていない設定は警告なく無視されます(エラーにはなりません)。モデル別のボイス設定
レスポンス
デフォルト(include_phonemes=false): ボディにバイナリオーディオを返します。
Content-Type: audio/wavまたはaudio/mpeg(output_formatに対応)。X-Audio-Lengthヘッダー: 生成音声の長さ(秒)です。
include_phonemes=true の場合: Base64 オーディオと音素配列を含む JSON ボディです。
注意事項
textが 300 文字を超えると400を返します。自動チャンキングには Python または TypeScript SDK をご利用いただくか、手動で分割してください(長文 を参照)。speedはdurationの後に適用されます。duration=5とspeed=2を指定すると、約 10 秒のオーディオが生成されます。styleを省略した場合は、ボイスのstyles配列の最初の値が使用されます。デフォルトはボイスごとに異なる場合があるため、ボイス取得 で確認してください。
関連項目
Docs: Create speech
Stream speech
Authorizations
Path Parameters
Body
The text to convert to speech
300The language code of the text
en, ko, ja, bg, cs, da, el, es, et, fi, hu, it, nl, pl, pt, ro, ar, de, fr, hi, id, ru, vi, hr, lt, lv, sk, sl, sv, tr, uk The style of character to use for the text-to-speech conversion
The model type to use for the text-to-speech conversion
sona_speech_1, sona_speech_2, sona_speech_2_flash, supertonic_api_1, supertonic_api_3 The desired output format of the audio file (wav, mp3). Default is wav.
wav, mp3 Return phoneme timing data with the audio
Pre-normalized text for TTS. Only used with sona_speech_2 and sona_speech_2_flash models.
Response
Returns either binary audio or JSON with phoneme data based on include_phonemes parameter
Binary audio file (when include_phonemes=false or omitted)