Text-to-Speech with Timestamp

음성합성 + Timestamp API

음성데이타 응답

Segmentation API의 음성데이타는 base64 인코딩된 값을 리턴하며, 아래와 같이 디코딩하여 사용한다.

data = response.json()

audio_b64 = data['audio']
audio = base64.b64decode(audio_b64)

Timestamp 응답

Segmentation API는 음성데이타와 함께 아래와 같이 입력 텍스트에 대한 Token list와 해당 Token의 시작/끝 시간(second) 정보를 리턴한다.

data['segmentaion'] = {
	"token_seq": ["_", "음", "성", "합", "성", "_", "테", "스", "트", "입", "니", "다", "."],
	"start_time_seq": [0, 0.06, 0.2, 0.36, 0.5, 0.68, 0.76, 0.84, 0.96, 1.04, 1.18, 1.3, 1.56],
	"end_time_seq": [0.06, 0.2, 0.36, 0.48, 0.66, 0.76, 0.84, 0.96, 1.04, 1.18, 1.3, 1.6, 2.04]
}
Body Params
string
required
Defaults to axtts-2-6

음성합성 Model Name

string
required
Defaults to aria

합성 보이스 설정 - 음성합성 지원 보이스 참조

string
required
Defaults to 음성합성 테스트입니다.

음성 생성을 위한 입력 문장 - 300자 미만 지원

string
Defaults to 1

음성 발화 속도 조정 - Range: [0.5, 2.0]

int32
Defaults to 22050

샘플링 레이트(Hz) 조정 - [8000, 16000, 22050]

string
enum
Defaults to wav

음성 출력 포맷 지정 - [wav, pcm, opus, mp3]

Allowed:
string

API 사용 서비스명

Headers
string

마이페이지>앱>앱키(appKey) 탭에서 확인 가능

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain