Text to speech
Stream speech
텍스트를 음성으로 변환하여 청크 단위 오디오 스트림으로 반환합니다.
POST
Convert text to speech with streaming response
이 문서는 영어 원문을 기반으로 자동 번역되었습니다. 표현이 어색하거나 모호한 부분이 있을 수 있으니, 정확한 내용은 영어 원문을 함께 확인해 주세요.
스트리밍은 현재 **
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는 더 긴 입력을 자동으로 청크 분할하여 이터레이터로 전달합니다.speed는duration이후에 적용됩니다(예:duration=5+speed=2≈ 10초).style을 생략하면 보이스의 기본 스타일이 사용됩니다. 기본값은 Get voice로 확인해 주십시오.
함께 보기
Docs: Stream speech
스트리밍을 사용할 시점과 SDK별 청크 소비 방법입니다.
LLM streaming TTS
OpenAI 및 Anthropic과의 엔드 투 엔드 레시피입니다.
Body
application/json
The text to convert to speech
Maximum string length:
300Response
Streaming audio data in binary format or NDJSON format with phoneme data based on includePhonemes parameter
Binary audio stream (when includePhonemes=false or omitted)