Skip to main content
POST
/
v1
/
text-to-speech
/
{voice_id}
Convert text to speech
curl --request POST \
  --url https://supertoneapi.com/v1/text-to-speech/{voice_id} \
  --header 'Content-Type: application/json' \
  --header 'x-sup-api-key: <api-key>' \
  --data '{
  "text": "<string>",
  "language": "en",
  "style": "<string>",
  "model": "sona_speech_1",
  "output_format": "wav",
  "voice_settings": {
    "pitch_shift": 0,
    "pitch_variance": 1,
    "speed": 1,
    "duration": 0,
    "similarity": 3,
    "text_guidance": 1,
    "subharmonic_amplitude_control": 1
  },
  "include_phonemes": false
}'
This response does not have an example.

エンドポイント

https://supertoneapi.com/v1/text-to-speech/{voice_id}

パスパラメータ

NameRequiredDescription
voice_idYes対象ボイスの ID です。

リクエストボディ

NameRequiredDescription
textYes変換するテキストです(最大 300 文字)。
languageYes言語コードです。サポート: en, ko, ja
styleNo感情スタイルです。例: neutral, happy, sad など。未指定の場合はキャラクターのデフォルトが適用されます。
modelNoTTS モデルです。デフォルト: sona_speech_1
output_formatNo出力フォーマットです。オプション: wav, mp3。デフォルト: wav
voice_settingsNo高度なボイスパラメータです(下記参照)。
include_phonemesNotrue の場合、オーディオ(Base64 エンコード)に加えて音素タイミングデータを返します。デフォルト: false
ボイス設定(任意)
NameRangeDefaultDescription
pitch_shift-24 → 240半音(semitone)単位のピッチ調整です。
pitch_variance0 → 21ピッチ変動の度合いです。
speed0.5 → 21生成オーディオを一様に速く/遅くします(比率)。
duration0 → 600値を指定すると、その長さ(秒)に合わせて音声が生成されます。
similarity1 → 53生成音声が元のキャラクターボイスにどれだけ近いかを制御します。
text_guidance0 → 41入力テキストに対して発話特性がどの程度敏感に適応するかを制御します。
subharmonic_amplitude_control0 → 21生成音声のサブハーモニック振幅量を制御します。

レスポンス

include_phonemes に応じて次のいずれかを返します。 バイナリオーディオ
**(デフォルト & include_phonemes=false の場合)
audio/wav – 生の WAV ファイル。
audio/mpeg – 生の MP3 ファイル。
音素データ付き JSON
(include_phonemes=true の場合)
{
  "audio_base64": "UklGRnoGAABXQVZF...",
  "phonemes": {
    "symbols": ["", "h", "ɐ", "ɡ", "ʌ", ""],
    "start_times_seconds": [0, 0.092, 0.197, 0.255, 0.29, 0.58],
    "durations_seconds": [0.092, 0.104, 0.058, 0.034, 0.29, 0.162]
  }
}

注意事項

  • text が 300 文字を超えると 400 エラーになります。
  • speed は duration の後に適用されます。(例: duration=5seconds, speed=2times → 最終オーディオ ≈ 10seconds)
  • style を指定しなくても呼び出せますが、デフォルトスタイルはキャラクターによって異なる場合があります。デフォルトスタイルは Get Voices API で確認してください(styles 配列の先頭がデフォルト)。
  • レスポンスのオーディオファイルは直接保存・再生できます(クライアントに応じて適切な処理が必要な場合があります)。

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 length: 300
language
enum<string>
required

The language code of the text

Available options:
en,
ko,
ja
style
string

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

model
string
default:sona_speech_1

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

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

Response

Returns either binary audio or JSON with phoneme data based on include_phonemes parameter

Binary audio file (when include_phonemes=false or omitted)