Ai Music logo

Ai Music

OrganizationPopular
ZJU-REAL
ai-music

AI 音乐 / BGM 生成:给短视频、社媒内容生成原创背景音乐 / 配乐 / 纯音乐。通过可插拔 provider(阿里 DashScope / Suno 类第三方 API)文生音乐,异步提交→轮询→下载,产物可再裁剪/归一化或加到视频。当用户说“AI 音乐”“AI 配乐”“生成 BGM”“背景音乐”“原创音乐”“AI 作曲”“纯音乐”“给视频配乐”“做首曲子”时使用。与 tts-voiceover 的区别:tts-voiceover 生成人声口播/旁白,ai-music 生成背景音乐/配乐(无人声或带演唱)。

Overview

PublisherZJU-REAL
RepositoryEasel
Skill nameai-music
Stars
1.2K
Forks
175
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ZJU-REAL on GitHub. Read the source before you install it.

Installation

Install the Ai Music AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZJU-REAL/Easel.git /tmp/Easel
mkdir -p .claude/skills
cp -r /tmp/Easel/skills/openclaw/ai-music .claude/skills/ai-music
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ai Music in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ai Music on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ai Music is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AI 音乐 / BGM 生成(AI Music)

给短视频、Vlog、社媒内容生成原创背景音乐 / 配乐 / 纯音乐。全程通过共享脚本 skills/shared/scripts/ai_music.py 封装音乐生成 API(可插拔 provider), 异步提交 → 轮询 → 下载。生成的音乐可再交给 audio_ops.py / video_ops.py 做裁剪、归一化或加到视频。

边界:本 SKILL 只做背景音乐 / 配乐。要人声口播 / 旁白 / 朗读tts-voiceover

输入

字段必填说明
prompt风格 / 情绪 / 乐器描述(如“轻快 lo-fi,钢琴+鼓点,vlog 片头”)
providerdashscopesuno-compatible,也可用 env MUSIC_PROVIDER
lyrics歌词(提供后走带演唱模式,不再是纯音乐)
duration时长(秒),部分 provider 支持
instrumental纯音乐(无人声 BGM)
output默认 outputs/主题名/{name}.mp3

输出

  • 音乐音频文件(mp3,放入 outputs/主题名/
  • 打印实际提交的 provider / model、任务轮询过程、最终输出路径

配置(需设的环境变量)

配置检查路径铁律:先 cdAGENTS.md 末尾给出的 Easel 项目根,确认当前目录有 .envskills/shared/scripts/,再运行注册表、check 或生成命令。不得改用 workspace 的 ./shared/scripts/...,也不得以 env / printenv 没显示变量为由判断未配置。

在项目根 .env 或环境变量中设置(脚本自动向上查找 .env)。用户自己填 key。

通用

bash
MUSIC_PROVIDER=dashscope        # 或 suno-compatible;也可用 --provider 覆盖

provider = dashscope(阿里云 DashScope / 百炼)

bash
DASHSCOPE_API_KEY=...           # 必填(别名 DASHSCOPE_KEY / ALIYUN_API_KEY)
DASHSCOPE_MUSIC_MODEL=audio-generation  # 可选(兼容旧名 DASHSCOPE_MODEL)
DASHSCOPE_BASE_URL=https://dashscope.aliyuncs.com/api/v1   # 可选

provider = suno-compatible(Suno 类第三方 API 网关)

bash
MUSIC_API_KEY=...               # 必填
MUSIC_BASE_URL=https://api.example.com/v1   # 必填,你的 API 根地址
MUSIC_MODEL=music-1             # 可选,按服务商模型名调整

执行步骤

先跑 python skills/shared/scripts/model_registry.py configured --group music --env-file .env。只有一个可用时直接显式传 --provider;多个可用且用户没点名时,先列出选项询问,不按 MUSIC_PROVIDER 擅自选择。

脚本路径(相对项目根):skills/shared/scripts/ai_music.py。每个子命令支持 -h

1. 先自检配置 check(不发请求)

bash
python skills/shared/scripts/ai_music.py check --provider dashscope

缺 key 会明确列出缺哪个 env(含别名提示)。配置齐了再往下。

2. 生成音乐 generate

bash
# 纯音乐 BGM(dashscope)
python skills/shared/scripts/ai_music.py generate --provider dashscope \
  --prompt "轻快的 lo-fi 嘻哈,钢琴 + 柔和鼓点,适合 vlog 片头" \
  --duration 30 --instrumental \
  -o outputs/主题名/vlog-bgm.mp3

# 带演唱(suno-compatible,给了歌词)
python skills/shared/scripts/ai_music.py generate --provider suno-compatible \
  --prompt "温暖的民谣,吉他弹唱" \
  --lyrics "$(cat lyrics.txt)" \
  -o outputs/主题名/song.mp3

--poll-interval(轮询间隔,默认 5s)、--timeout(超时,默认 300s)可按需调。

3. 后处理(可选,复用已有共享脚本,不在本 SKILL 重造)

bash
# ① 裁剪到片头需要的长度
python skills/shared/scripts/audio_ops.py trim outputs/主题名/vlog-bgm.mp3 \
  -o outputs/主题名/bgm-8s.mp3 --duration 8

# ② 归一化到社媒响度(-14 LUFS)
python skills/shared/scripts/audio_ops.py normalize outputs/主题名/vlog-bgm.mp3 \
  -o outputs/主题名/bgm-norm.mp3

# ③ 把 BGM 加到视频(可调原声/BGM 音量比,自动循环并截断)
python skills/shared/scripts/video_ops.py bgm -i clip.mp4 -o clip_bgm.mp4 \
  --music outputs/主题名/vlog-bgm.mp3 --voice-volume 1.0 --music-volume 0.3

规则

  1. 先 check 再 generate — 缺 key 时 check 给出清晰中文提示,不浪费一次失败请求。
  2. 绝不覆盖原始素材 — 只写新文件到 outputs/主题名/
  3. 不重造能力 — 裁剪 / 归一化 / 加视频 BGM 复用 audio_ops.py / video_ops.py
  4. provider 可插拔 — 换服务商只改 --provider + env,SKILL 流程不变。
  5. 与 tts-voiceover 分工 — 背景音乐/配乐找 ai-music,人声配音找 tts-voiceover。 两者可组合:ai-music 出 BGM + tts-voiceover 出旁白 → video_ops.py bgm 混音。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ai Music AI skill do?

AI 音乐 / BGM 生成:给短视频、社媒内容生成原创背景音乐 / 配乐 / 纯音乐。通过可插拔 provider(阿里 DashScope / Suno 类第三方 API)文生音乐,异步提交→轮询→下载,产物可再裁剪/归一化或加到视频。当用户说“AI 音乐”“AI 配乐”“生成 BGM”“背景音乐”“原创音乐”“AI 作曲”“纯音乐”“给视频配乐”“做首曲子”时使用。与 tts-voiceover 的区别:tts-voiceover 生成人声口播/旁白,ai-music 生成背景音乐/配乐(无人声或带演唱)。

Why use Ai Music on TypingMind?

Because you install it once and use it with any model. Ai Music is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ai Music in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ZJU-REAL/Easel/tree/main/skills/openclaw/ai-music. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ai Music?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ai Music?

As many as you like. As long as a model supports skills, you can use Ai Music with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ai Music AI skill free?

Yes. It is published on GitHub by ZJU-REAL under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇