Skip to main content
POST
Convert text to speech
このドキュメントは英語の原文から自動翻訳されています。表現に不自然な箇所がある場合があります。正確な内容は英語の原文もあわせてご確認ください。
テキストから音声を生成し、レスポンスボディとしてオーディオを返します。コンセプトの解説、SDK サンプル、Tips については Docs: 音声生成 をご参照ください。

エンドポイント

パスパラメータ

リクエストボディ

モデル別対応言語

ボイス設定

サポートされていない設定は警告なく無視されます(エラーにはなりません)。

モデル別のボイス設定

レスポンス

デフォルト(include_phonemes=false): ボディにバイナリオーディオを返します。
  • Content-Type: audio/wav または audio/mpegoutput_format に対応)。
  • X-Audio-Length ヘッダー: 生成音声の長さ(秒)です。
include_phonemes=true の場合: Base64 オーディオと音素配列を含む JSON ボディです。

注意事項

  • text が 300 文字を超えると 400 を返します。自動チャンキングには Python または TypeScript SDK をご利用いただくか、手動で分割してください(長文 を参照)。
  • speedduration の後に適用されます。duration=5speed=2 を指定すると、約 10 秒のオーディオが生成されます。
  • style を省略した場合は、ボイスの styles 配列の最初の値が使用されます。デフォルトはボイスごとに異なる場合があるため、ボイス取得 で確認してください。

関連項目

Docs: Create speech

SDK サンプル付きの解説。

Stream speech

クリップ全体を待たずに、オーディオチャンクをストリーミングします。

Authorizations

x-sup-api-key
string
header
required

Path Parameters

voice_id
string
required

Body

application/json
text
string
required

The text to convert to speech

Maximum string length: 300
language
enum<string>
required

The language code of the text

Available options:
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
style
string

The style of character to use for the text-to-speech conversion

model
enum<string>
default:sona_speech_1

The model type to use for the text-to-speech conversion

Available options:
sona_speech_1,
sona_speech_2,
sona_speech_2_flash,
supertonic_api_1,
supertonic_api_3
output_format
enum<string>
default:wav

The desired output format of the audio file (wav, mp3). Default is wav.

Available options:
wav,
mp3
voice_settings
object
include_phonemes
boolean
default:false

Return phoneme timing data with the audio

normalized_text
string

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)