Token导航 LogoToken导航TokenDH.com
音频生成敏感数据github未标认证来源可访问许可证需确认审计通过

byted-music-generate字节音乐生成

Agent Skill

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。它适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需要确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆、版权音乐或公开发布时,应先核对授权和合规边界。

总安装

1,234

周安装

53

GitHub Stars

324

下载量

432
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:byted-music-generate(字节音乐生成)
来源仓库:https://github.com/bytedance/agentkit-samples
仓库路径:skills/byted-music-generate
安装命令:
npx skills add https://github.com/bytedance/agentkit-samples --skill byted-music-generate
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bytedance/agentkit-samples --skill byted-music-generate

简介

生成 vocals 歌曲、器乐 BGM 与 AI 作词,支持多风格定制。

  • 可选择 ARK_SKILL_API_BASE 与 KEY 或通过网关方式接入服务。
  • 需明确区分人声与伴奏输出格式以满足不同制作需求。
  • 回复中必须包含计费预估值说明及火山定价页指引。
  • 禁止在未获授权情况下商用生成音乐作品,需用户自行确认版权。

SKILL.md

Music Generate Skill

Generate music using the Volcengine Music Generation API. Supports vocal songs, instrumental BGM, and AI lyrics generation.

Trigger Conditions

  1. User wants to generate a song (with lyrics or a text prompt)
  2. User needs background music, instrumental tracks, or soundtracks
  3. User wants AI-generated lyrics
  4. User mentions "write a song", "music generation", "BGM", "background music", "lyrics"

Environment Variables

Two authentication methods are supported (gateway takes priority):

Option 1: API Gateway (recommended)

  • ARK_SKILL_API_BASE — API gateway base URL
  • ARK_SKILL_API_KEY — API gateway authentication key

Option 2: Direct AK/SK

  • VOLCENGINE_ACCESS_KEY — AccessKey ID
  • VOLCENGINE_SECRET_KEY — AccessKey Secret
  • How to obtain: Volcengine Console → Account → Key Management → Create Key

Usage

  1. Determine user intent and select the mode (song / bgm / lyrics).
  2. cd to the skill directory: skills/byted-music-generate.
  3. Run the script. The script polls the API internally and may take several minutes to complete (typically 1–5 minutes for song/bgm).
  4. Monitor execution: If the runtime environment moves the command to background, you MUST periodically (every 10 seconds) read the terminal output to check whether the script has finished. The script prints polling progress to stderr and outputs a single JSON line to stdout upon completion.
  5. Once completed, return the audio_url or lyrics from the JSON output to the user.

Three Modes

1. song — Vocal Song

User provides lyrics (Lyrics) or a text prompt (Prompt) to generate a vocal song.

# With text prompt
python scripts/music_generate.py song --prompt "A song about summer at the beach" --genre Pop --gender Female

# With lyrics
python scripts/music_generate.py song --lyrics "[verse]\nMoonlight on the windowsill\nMemories flowing like water\n[chorus]\nYou are my moonlight" --genre Folk --mood "Sentimental/Melancholic/Lonely"

Note: --lyrics and --prompt are mutually exclusive; lyrics takes priority. If the user hasn't provided lyrics, you can first use the lyrics mode to generate them, then pass the result to the song mode.

2. bgm — Instrumental BGM

Describe the desired music in natural language. The v5.0 model does not require Genre/Mood parameters — just describe everything in the --text field.

python scripts/music_generate.py bgm --text "Relaxed coffee shop ambiance music with piano and guitar" --duration 60

# With song structure segments
python scripts/music_generate.py bgm --text "Epic game soundtrack" --segments '[{"Name":"intro","Duration":10},{"Name":"chorus","Duration":30}]'

3. lyrics — Lyrics Generation

Returns synchronously (no polling needed). Can be used standalone or as a pre-step for the song mode.

python scripts/music_generate.py lyrics --prompt "A song about graduation farewell" --genre Folk --mood "Sentimental/Melancholic/Lonely" --gender Female

Manual Task Query (timeout fallback)

python scripts/music_generate.py query --task-id "202601397834584670076931"

Mode Detection Logic

User Request
    ↓
Contains "instrumental/BGM/background music/soundtrack"?
    ├─ Yes → bgm mode
    └─ No → Contains "lyrics/write lyrics" and does NOT request audio?
        ├─ Yes → lyrics mode
        └─ No → song mode
            ├─ User provided lyrics → --lyrics
            └─ User only described a theme → --prompt (or lyrics first, then song)

Script Parameters

song mode

ParameterRequiredDescription
--lyricseitherLyrics with structure tags
--prompteitherText prompt (Chinese, 5-700 chars)
--model-versionnov4.0 or v4.3 (default: v4.3)
--genrenoMusic genre
--moodnoMusic mood
--gendernoFemale / Male
--timbrenoVocal timbre
--durationnoDuration in seconds [30-240]
--keynoMusical key (v4.3 only)
--kmodenoMajor / Minor (v4.3 only)
--temponoTempo (v4.3 only)
--instrumentnoInstruments, comma-separated (v4.3 only)
--genre-extranoSecondary genres, comma-separated, max 2 (v4.3 only)
--scenenoScene tags, comma-separated (v4.3 only)
--langnoLanguage (v4.3 only)
--vod-formatnowav / mp3 (v4.3 only)
--billingnoprepaid / postpaid (default: postpaid)
--timeoutnoMax wait seconds (default: 300)

bgm mode

ParameterRequiredDescription
--textyesNatural language description
--durationnoDuration in seconds [30-120]
--segmentsnoJSON array of song structure segments
--versionnoModel version (default: v5.0)
--enable-input-rewritenoEnable prompt rewriting
--billingnoprepaid / postpaid (default: postpaid)
--timeoutnoMax wait seconds (default: 300)

lyrics mode

ParameterRequiredDescription
--promptyesLyrics prompt (Chinese only, <500 chars)
--genrenoMusic genre
--moodnoMusic mood
--gendernoFemale / Male

Script Return Info

The script outputs JSON with the following fields:

{
    "status": "success | timeout | error",
    "mode": "song | bgm | lyrics | query",
    "task_id": "...",
    "audio_url": "https://...",
    "duration": 46.0,
    "lyrics": "...",
    "error": null
}

Return the audio_url to the user for download or playback. URLs are valid for approximately 1 year, but users should save the file promptly.

Error Handling

  • IF the script raises PermissionError: Authentication not configured..., inform the user to configure either API gateway (ARK_SKILL_API_BASE + ARK_SKILL_API_KEY) or direct AK/SK (VOLCENGINE_ACCESS_KEY + VOLCENGINE_SECRET_KEY) environment variables. Write them to the workspace environment variable file, then retry.
  • IF status is "timeout", the task is still generating. Provide the user with the task_id and the manual query command from the output.
  • IF copyright check fails (code 50000001), suggest the user enrich the description or increase the audio duration, then retry.

References

适合场景

01

生成背景音乐

02

生成歌曲或旋律

03

视频和播客配乐

04

社媒内容音频素材

能力概览

能力 1

调用音乐生成模型

能力 2

支持文本到音乐或歌曲生成

能力 3

提供 CLI 示例和使用场景

能力 4

适合音频内容工作流

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.24%
按下载量换算152

Claude

28.03%
按下载量换算121

Cursor

17.98%
按下载量换算78

Gemini CLI

8.93%
按下载量换算39

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills