复刻音色,本 API 可以基于之前上传的 WAV、MP3文件,复制一个新的音色,用于 TTS 生成音频,或者用于 Realtime 实时语音对话。Documentation Index
Fetch the complete documentation index at: https://platform.stepfun.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
请求地址
POST https://api.stepfun.com/v1/audio/voices
Step Plan 场景请使用
POST https://api.stepfun.com/step_plan/v1/audio/voices请求参数
-
modelstringrequired
需要使用的模型名称,可选项有stepaudio-2.5-tts、step-tts-2、step-tts-mini。 -
textstringoptional
音频源文件对应的文本内容,如不传递,则调用系统 ASR 进行解析;为保证效果,建议传入。 -
file_idstringrequired
用于复刻音色的音频源文件的 File ID。File ID 可以通过 上传文件 获取,上传时,purpose 必须为 storage,支持文件格式为 mp3, wav。音频的时长范围应在 5 ~ 10 秒内;
请求响应
-
idstring
音色 ID,可用于后续的音频生成。 -
objectstring
文件类型,固定为 audio.voice -
duplicatedboolean
是否重复请求。如果用户二次消费,则新增此字段,告诉用户已经创建过了。
示例
- curl