涵盖六种语言的人类级语音合成,包含12个系统语音、自然语言传递方向和流媒体播放。
字符计数遵循StepFun定价:一个汉字算一个字符,两个英文字母算一个字符,两个标点符号算一个字符。
也称为 StepFun StepAudio 3 TTS
stepaudio-3-tts/v1/audio/speechPOST/v1/audio/speech:streamstepfun/stepaudio-3-tts来自 EmpirioLabs 目录的实时按量计费价格。只为实际用量付费,没有月度最低消费。
StepAudio 3 TTS 通过 POST /v1/audio/speech 生成语音并返回可播放的音频。把要朗读的文本作为 input,连同模型 ID stepaudio-3-tts 一起发送。 在EmpirioLabs 控制台获取 API 密钥。
curl https://api.empiriolabs.ai/v1/audio/speech \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "stepaudio-3-tts",
"input": "Welcome to EmpirioLabs. Your build just finished."
}' \
--output speech.mp3import requests
response = requests.post(
"https://api.empiriolabs.ai/v1/audio/speech",
headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
json={"model": "stepaudio-3-tts", "input": "Welcome to EmpirioLabs."},
)
with open("speech.mp3", "wb") as f:
f.write(response.content)EmpirioLabs 上 StepAudio 3 TTS API 支持的请求参数。省略字段时使用默认值。
| 参数 | 类型 | 默认值 | 范围 / 值 | 描述 |
|---|---|---|---|---|
| input | string | - | 最大 1000 | 文本用于合成。最多1000字符。括号内内容被视为传递方向,不言语。 |
| voice | enum | lively-girl | lively-girl, vibrant-youth, soft-spoken-gentleman, magnetic-v... | 生成语音的声音。 |
| instruction | string | - | 最大 500 | 全文的全局情感或风格指导,用自然语言表达。最多500字符。 |
| speed | number | 1 | 0.5 到 2 | 说话速度。 |
| volume | number | 1 | 0.1 到 2 | 输出音量。 |
| language | enum | en | en, zh, ja, ko, fr, es | 目标语言。日语、韩语、法语和西班牙语目前为预览阶段。 |
| response_format | enum | mp3 | mp3, wav, flac, opus, pcm | 输出音频格式。 |
| sample_rate | enum | 24000 | 8000, 16000, 22050, 24000 | 输出采样率以Hz为单位。 |
| markdown_filter | boolean | false | - | 在输入口述前,先去除Markdown语法。 |
| pronunciation_map | string | - | - | 可选的发音覆盖,作为带有“written/spoken”规则声调数组的对象。 |
Maximum input is 1,000 characters. Content in parentheses is treated as delivery direction and is not spoken. Use instruction for global emotion or style guidance, up to 500 characters. Twelve system voices are available. Recognized languages are Chinese, English, Japanese, Korean, French, and Spanish, with languages other than Chinese and English in preview. Output formats are mp3, wav, flac, opus, and pcm at 8000, 16000, 22050, or 24000 Hz. Wav is returned as a complete file rather than streamed. This model does not support voice_label.
在 EmpirioLabs,StepAudio 3 TTS 按量计费:合成 $0.36 每10,000字符。本页的实时价格表始终与 API 的实际计费一致。
StepAudio 3 TTS 通过 api.empiriolabs.ai 上的 POST /v1/audio/speech 提供,使用标准的 Bearer 令牌认证。
可以。EmpirioLabs Playground在浏览器中以与 API 相同的参数运行 StepAudio 3 TTS,你可以在写代码之前先测试提示词。
创建 EmpirioLabs 账户,然后在控制台的 API Keys生成密钥。计费使用按量付费的额度,只为实际发出的请求付费。