Skip to main content
POST
Convert text to speech with streaming response
이 문서는 영어 원문을 기반으로 자동 번역되었습니다. 표현이 어색하거나 모호한 부분이 있을 수 있으니, 정확한 내용은 영어 원문을 함께 확인해 주세요.
생성된 음성을 청크 단위로 스트리밍 반환하여 전체 클립이 준비되기 전부터 재생을 시작할 수 있습니다. 스트리밍과 빠른 비스트리밍 모델 중 어느 것을 선택할지에 대해서는 Docs: 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), 청크당 하나의 객체:

참고사항

  • Stream speech는 현재 베타이며 sona_speech_1만 지원합니다.
  • text가 300자를 초과하면 400을 반환합니다. SDK는 더 긴 입력을 자동으로 청크 분할하여 이터레이터로 전달합니다.
  • speedduration 이후에 적용됩니다(예: duration=5 + speed=2 ≈ 10초).
  • style을 생략하면 보이스의 기본 스타일이 사용됩니다. 기본값은 Get voice로 확인해 주십시오.

함께 보기

Docs: Stream speech

스트리밍을 사용할 시점과 SDK별 청크 소비 방법입니다.

LLM streaming TTS

OpenAI 및 Anthropic과의 엔드 투 엔드 레시피입니다.

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

Streaming audio data in binary format or NDJSON format with phoneme data based on includePhonemes parameter

Binary audio stream (when includePhonemes=false or omitted)