Stream speech
テキストを音声に変換し、チャンク化されたオーディオストリームとして出力します。
sona_speech_1 のみでサポートされています。エンドポイント
パスパラメータ
リクエストボディ
Content-Type: application/json
レスポンス
デフォルト(include_phonemes=false): バイナリオーディオストリームを返します。
Content-Type: audio/wavまたはaudio/mpeg(output_formatに対応)。- 最初のチャンクにはオーディオファイルヘッダーが含まれ、以降のチャンクは生のオーディオデータです。
include_phonemes=true の場合: 改行区切りの JSON(NDJSON)で、1 チャンクにつき 1 オブジェクトを返します。
注意事項
- 音声ストリーミングは現在 ベータ 版で、
sona_speech_1のみをサポートします。 textが 300 文字を超えると400を返します。SDK は長い入力を自動でチャンキングし、イテレーターにチャンクを転送します。speedはdurationの後に適用されます(例:duration=5+speed=2で約 10 秒)。styleを省略した場合はボイスのデフォルトスタイルが適用されます。デフォルトは ボイス取得 で確認できます。
関連項目
Docs: Stream speech
LLM streaming TTS
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
Streaming audio data in binary format or NDJSON format with phoneme data based on includePhonemes parameter
Binary audio stream (when includePhonemes=false or omitted)