Convert text to speech
Text to speech
Create speech
원하는 보이스를 사용하여 텍스트를 완전한 오디오 파일로 변환합니다.
POST
Convert text to 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를 참고해 주십시오.speed는duration이후에 적용됩니다.duration=5,speed=2로 설정하면 약 10초의 오디오가 생성됩니다.style을 생략하면 보이스의styles배열 첫 번째 값이 사용됩니다. 보이스마다 기본값이 다를 수 있으므로 Get voice로 확인해 주십시오.
함께 보기
Docs: Create speech
SDK 예제와 함께 보는 가이드입니다.
Stream speech
전체 클립을 기다리지 않고 오디오 청크를 스트리밍합니다.
Authorizations
Path Parameters
Body
application/json
The text to convert to speech
Maximum string length:
300The 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 The style of character to use for the text-to-speech conversion
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 The desired output format of the audio file (wav, mp3). Default is wav.
Available options:
wav, mp3 Return phoneme timing data with the audio
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)