generate_music
Create background music from a text prompt and get a WAV file path. Use for videos, games, or transitions; note output has a clear start and end, not seamless loops.
Instructions
生成一段背景音乐(Stable Audio), 返回 WAV 的本机路径。
参数: prompt: 音乐描述(风格/乐器/情绪, 英文效果最佳) seed: 随机种子(可选) duration: 秒数, 上限 120 num_inference_steps: 推理步数(默认 100, 越多越慢)
注意: 出来的是一段有头有尾的音乐, 没有做无缝循环点。要循环播放的 BGM 请自己在编辑器里找循环点, 或把它当作一次性过场音乐。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| prompt | Yes | ||
| duration | No | ||
| num_inference_steps | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| path | No | ||
| error | No | ||
| clamped | No | ||
| duration | No | ||
| warnings | No | ||
| truncated | No | ||
| error_code | No | ||
| requested_duration | No |