PopNowAPI 文档
正文

Seed Speech 2.0 API 调用参考

41 种音色,以自然语言设置语气

用一个 PopNow API 密钥,就能在自己的代码里调用 Seed Speech 2.0。下面列出要填的调用名、这个型号接受的每个输入字段、每次请求花多少美元(USD),以及一段可以直接粘进终端运行的请求。

参数说明直接取自型号的输入 schema,暂时只有英文。

一览

出品方
ByteDance
产出
音频
起价
$0.072 USD 每 1000 字符

价格以 USD 显示,从你的 PopNow 余额扣款。任务受理时预留可能的最高费用,完成后按实际用量结算并释放余款;失败任务不收费。运行前可调用 POST /api/v1/jobs/quote 获取准确报价。

文字转语音

bytedance/seed-speech-2.0/text-to-speech

价格

选项USD
默认$0.072 每 1000 字符

参数

字段类型默认值取值范围作用
text必填string—最多 5000 个字符The words to be spoken, exactly as written. Billed per 1,000 characters.
voice_id可选stringstokie_envivi_mixed_en_zh_ja_es_id, mindy_en_es_id_pt_zh, stokie_en, dacey_en, tim_en, kian_en_zh, cedric_en_zh, sophie_en_zh, jean_en_zh, magnus_en_zh, mabel_en_zh, nadia_en_zh, opal_en_zh, pearl_en_zh, … (+27)Preset voice. The suffix shows the languages it is built for.
instructions可选string—最多 1000 个字符How to read the text: tone, emotion, pace or volume. Not spoken and not billed.
speed可选number10.5 到 2Speaking rate; 1 is the voice's normal pace.
pitch可选integer0-12 到 12Pitch shift in semitones; 0 keeps the voice's own pitch.
volume可选number10.5 到 2Loudness multiplier; 1 is the normal level.
language可选string—zh, en, ja, es-mx, id, pt-br, ko, it, de, frForces the reading language. Leave empty to detect it from the text.
output_format可选stringmp3mp3, opusFile format of the result; opus is an Ogg Opus file.
sample_rate可选integer—8000, 16000, 22050, 24000, 32000, 44100, 48000Sample rate in Hz. The model uses 24000 when omitted.

请求示例

这段请求原样就能运行,没写的字段都用默认值。运行前先把密钥放进环境变量 POPNOW_API_KEY。

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "bytedance/seed-speech-2.0/text-to-speech",
  "input": {
    "text": "Hi there! This voice was created with the PopNow API in just a few seconds."
  }
}'

响应里会立刻带回 taskId。之后用 GET /api/v1/jobs/recordInfo 取结果,或者在请求里加上 callBackUrl 等通知。

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

接下来

本页内容