본문으로 건너뛰기
cccskills
무료GitHub에 공개

ai-music

Generate background music for short videos, vlogs, and social posts from descriptions of mood, style, and instruments. Download MP3 audio, optionally include sung lyrics, and use shared scripts to trim tracks, adjust loudness, or add music to videos.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

AI 音乐 / BGM 生成:给短视频、社媒内容生成原创背景音乐 / 配乐 / 纯音乐。通过可插拔 provider(阿里 DashScope / Suno 类第三方 API)文生音乐,异步提交→轮询→下载,产物可再裁剪/归一化或加到视频。

当用户说“AI 音乐”“AI 配乐”“生成 BGM”“背景音乐”“原创音乐”“AI 作曲”“纯音乐”“给视频配乐”“做首曲子”时使用。与 tts-voiceover 的区别:tts-voiceover 生成人声口播/旁白,ai-music 生成背景音乐/配乐(无人声或带演唱)。

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Generating background music for a vlog intro
  • Creating instrumental music to match a social post
  • Generating a sung track from supplied lyrics
  • Trimming generated music and adding it to a video

포함된 파일(2)

  • SKILL.md5.4 KB
  • EASEL-META.md1.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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 片头”)
provider否dashscope 或 suno-compatible,也可用 env MUSIC_PROVIDER
lyrics否歌词(提供后走带演唱模式,不再是纯音乐)
duration否时长(秒),部分 provider 支持
instrumental否纯音乐(无人声 BGM)
output否默认 outputs/主题名/{name}.mp3

输出

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

配置(需设的环境变量)

配置检查路径铁律:先 cd 到运行时说明给出的 Easel 项目根,确认当前目录有 .env 和 skills/shared/scripts/,再运行注册表、check 或生成命令。不得改用 workspace 的共享脚本副本,也不得以 env / printenv 没显示变量为由判断未配置。

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

通用

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

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

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 网关)

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(不发请求)

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

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

2. 生成音乐 generate

# 纯音乐 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 重造)

# ① 裁剪到片头需要的长度
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。 两者可组合:音频文件内的人声+BGM 用 audio_mix.py mix;给视频加 BGM/旁白才用 video_ops.py bgm(旁白短于视频时加 --music-loop-off)。

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Generate images from written descriptions, transform existing images with editing instructions, or create several variations. Choose image dimensions and quantity, then save the results using an OpenAI-compatible service or apimart with your own API key.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Generating an illustration from a written description
  • Changing an image's background using instructions
  • Creating several variations of an existing image
ZJU-REAL/Easel4천2026년 10월 23일 업데이트

Create new videos from written scene descriptions or still images using external AI services. Set the aspect ratio and duration, animate a character image, and request generated audio when the selected model supports it.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Generate a short video from a scene description
  • Animate a still image
  • Create character motion from a starting image
ZJU-REAL/Easel4천2026년 10월 23일 업데이트

Organize generated images, videos, and text in outputs/ by date, platform, and type. Add tags, search filenames and content, produce asset lists and reports, and preview archive moves before applying them to make past work easier to reuse.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Organizing generated assets by date, platform, and type
  • Finding past content through keywords and tags
  • Listing assets for a specific account or platform
ZJU-REAL/Easel4천2026년 10월 23일 업데이트

Reduce background noise in audio recordings or video soundtracks with three processing levels. Keep the original file, create a cleaned version, and receive a report of the settings used and file details before and after processing.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reducing fan or air conditioner noise in recordings
  • Cleaning speech in podcasts and interviews
  • Reducing noise in a video's audio track
ZJU-REAL/Easel4천2026년 10월 23일 업데이트

Edit audio files by trimming sections, converting formats, matching loudness, or extracting sound from videos. You can also join recordings, add fades, and change playback speed while keeping the original pitch.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Trim a recording to the section you need
  • Convert audio formats and match loudness
  • Extract audio from a video
ZJU-REAL/Easel4천2026년 10월 23일 업데이트

audio-mix

무료

Combine narration, background music, and timed sound effects into one audio file. Background music can loop to match the narration and automatically become quieter during speech, a technique called ducking, with controls for relative volume.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add background music to narration
  • Automatically lower music during speech
  • Place sound effects at specific times
ZJU-REAL/Easel4천2026년 10월 23일 업데이트

ZJU-REAL의 스킬 모두 보기

이 스킬의 문제 신고