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>",
  "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,
  "normalized_text": "<string>"
}
'
"<string>"

Documentation Index

Fetch the complete documentation index at: https://docs.supertoneapi.com/llms.txt

Use this file to discover all available pages before exploring further.

이 문서는 영어 원문을 기반으로 자동 번역되었습니다. 표현이 어색하거나 모호한 부분이 있을 수 있으니, 정확한 내용은 영어 원문을 함께 확인해 주세요.
텍스트로부터 음성을 생성하고 응답 본문에 오디오를 반환합니다. 개념적 가이드, SDK 예제, 팁은 Docs: Create speech를 참고해 주십시오.

엔드포인트

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

경로 파라미터

NameRequiredDescription
voice_id대상 보이스의 ID입니다.

요청 본문

NameRequiredDescription
text변환할 텍스트입니다. 최대 300자. 더 긴 입력은 SDK를 사용하거나 클라이언트 측에서 분할해 주십시오.
language언어 코드입니다(예: en, ko, ja). 보이스와 모델이 모두 지원해야 합니다.
style감정 스타일입니다(예: neutral, happy). 생략하면 보이스의 기본 스타일이 적용됩니다.
modelTTS 모델입니다. 기본값은 sona_speech_1.
output_formatwav(기본값) 또는 mp3.
voice_settings고급 보이스 파라미터입니다(아래 참조).
include_phonemestrue이면 응답이 base64 오디오와 음소 타이밍 데이터가 포함된 JSON으로 전환됩니다. 기본값은 false.
normalized_text발음 정규화된 보조 텍스트입니다(sona_speech_2sona_speech_2_flash에서 주로 일본어용으로 사용됩니다).

모델별 지원 언어

ModelLanguages
sona_speech_2, sona_speech_2_flashen, ko, ja, bg, cs, da, el, es, et, fi, hu, it, nl, pl, pt, ro, ar, de, fr, hi, id, ru, vi
supertonic_api_3en, ko, ja, ar, bg, cs, da, de, el, es, et, fi, fr, hi, hr, hu, id, it, lt, lv, nl, pl, pt, ro, ru, sk, sl, sv, tr, uk, vi
supertonic_api_1en, ko, ja, es, pt
sona_speech_1en, ko, ja

보이스 설정

지원되지 않는 설정은 조용히 무시되며 오류가 발생하지 않습니다.
NameRangeDefaultDescription
pitch_shift-24 → 240반음(semitone) 단위의 피치 조정입니다.
pitch_variance0 → 21피치 변동 정도입니다.
speed0.5 → 21재생 속도 배수입니다. duration 이후에 적용됩니다.
duration0 → 6000이 아닌 값을 지정하면 해당 길이(초)에 맞추어 오디오를 생성합니다.
similarity1 → 53출력이 원본 캐릭터 보이스와 얼마나 유사한지 제어합니다.
text_guidance0 → 41텍스트 내용에 따라 발화 특성이 얼마나 민감하게 적응할지 제어합니다.
subharmonic_amplitude_control0 → 21생성 음성의 서브하모닉 진폭 양을 제어합니다.

모델별 보이스 설정

Settingsona_speech_2sona_speech_2_flashsupertonic_api_3supertonic_api_1sona_speech_1
pitch_shift, pitch_variance, duration
speed
similarity, text_guidance
subharmonic_amplitude_control

응답

기본값 (include_phonemes=false): 본문에 바이너리 오디오가 담깁니다.
  • Content-Type: audio/wav 또는 audio/mpeg(output_format에 따름).
  • X-Audio-Length 헤더: 생성된 오디오의 길이(초)입니다.
include_phonemes=true일 때: base64 오디오와 음소 배열이 포함된 JSON 본문이 반환됩니다.
{
  "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을 반환합니다. 자동 청크 분할을 위해 Python 또는 TypeScript SDK를 사용하거나 직접 분할해 주십시오 — Long text를 참고해 주십시오.
  • speedduration 이후에 적용됩니다. duration=5, speed=2로 설정하면 약 10초의 오디오가 생성됩니다.
  • style을 생략하면 보이스의 styles 배열 첫 번째 값이 사용됩니다. 보이스마다 기본값이 다를 수 있으므로 Get voice로 확인해 주십시오.

함께 보기

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)