Skip to main content
POST
Convert text to speech
이 문서는 영어 원문을 기반으로 자동 번역되었습니다. 표현이 어색하거나 모호한 부분이 있을 수 있으니, 정확한 내용은 영어 원문을 함께 확인해 주세요.
텍스트로부터 음성을 생성하고 응답 본문에 오디오를 반환합니다. 개념적 가이드, SDK 예제, 팁은 Docs: 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를 사용하거나 직접 분할해 주십시오 — 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)