Skip to main content
POST
tts

请求头

Authorization
string
必填
model
string
必填
Content-Type
string
必填

请求体

application/json
text
string
必填

要合成的文本。

reference_id
string

预先创建的音色或模型 ID。

references
object[]

直接随请求提供的参考音频和对应文本。

temperature
number
默认值:0.7
必填范围: 0 <= x <= 1
top_p
number
默认值:0.7
必填范围: 0 <= x <= 1
chunk_length
integer
默认值:300
必填范围: 100 <= x <= 300
normalize
boolean
默认值:true
format
enum<string>
默认值:mp3
可用选项:
wav,
pcm,
mp3,
opus
sample_rate
integer | null

输出音频的采样率;不传时使用对应格式的默认值。

mp3_bitrate
enum<integer>
默认值:128
可用选项:
64,
128,
192
opus_bitrate
enum<integer>
默认值:-1000
可用选项:
-1000,
24000,
32000,
48000,
64000
latency
enum<string>
默认值:normal

延迟与质量的平衡模式。

可用选项:
low,
normal,
balanced
max_new_tokens
integer
默认值:1024
repetition_penalty
number
默认值:1.2
min_chunk_length
integer
默认值:50
必填范围: 0 <= x <= 100
condition_on_previous_chunks
boolean
默认值:true
early_stop_threshold
number
默认值:1
必填范围: 0 <= x <= 1
prosody
object

响应

返回合成后的音频流。音频格式由请求体中的 format 决定。

The response is of type file.