mcpField
S
sound-effects

sound-effects

github.com/awesome-genmedia创意与媒体4341 次安装32 周前更新
代码仓库

关于 sound-effects

sound-effects 是通过 each::sense 生成定制音效的技能,系统会按请求选择模型。适用于需要音效、环境声、拟音或音乐性声音的创作者,并支持文本提示词和参考图像。

主要功能

  1. 01通过提示词生成音效
  2. 02自动选择模型
  3. 03支持最多 4 张参考图像
  4. 04支持流式或完整响应
  5. 05通过脚本批量生成

适用场景

  1. 01制作 UI 通知音
  2. 02构建环境氛围声
  3. 03生成拟音和冲击音效

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/awesome-genmedia/skills --skill sound-effects

安装后在 Claude Code 中输入/sound-effects确认已加载。

详细介绍

音效

使用 each::sense 为任何用途生成自定义音效。它是一款智能 AI Agent,可根据你的请求自动选择最佳模型。

快速开始

需要 each::labs API 密钥。请前往 eachlabs.ai 获取。

使用 curl
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a sound effect: a heavy wooden door creaking open slowly in a stone castle hallway, with echo and reverb. 3 seconds long."}],
    "stream": false
  }'
使用 Python(OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_EACHLABS_API_KEY",
    base_url="https://eachsense-agent.core.eachlabs.run/v1"
)

response = client.chat.completions.create(
    model="eachsense/beta",
    messages=[{"role": "user", "content": "Generate a sound effect: a heavy wooden door creaking open slowly in a stone castle hallway, with echo and reverb. 3 seconds long."}]
)

print(response.choices[0].message.content)
使用参考图像
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Generate realistic sound effects that match this scene. Create the ambient soundscape a viewer would hear if they were standing in this location."},
              {"type": "image_url", "image_url": {"url": "https://example.com/forest-scene.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

图像通过 OpenAI 多模态内容格式在消息中发送。每个请求最多可包含 4 张图像。

流式传输

设置 "stream": true 可获取实时 SSE 响应,设置 "stream": false 可在单个响应中获取完整结果。流式传输适用于在 UI 中显示进度;非流式传输则更适合脚本和自动化任务。

可用模型

模型优势最适用于
stable-audio-2-5精准的音频生成、短内容、高品质音效、拟音、环境音、UI 音效
mureka-generate-music音乐化声音设计、调性音效音乐短促提示音、广告 jingles、调性过渡

音效类别

类别示例典型时长
自然雨、雷声、风、鸟鸣、海浪、火焰噼啪声3-30 秒
撞击拳击、碰撞、爆炸、重击、碎裂、闷响0.5-3 秒
机械发动机启动、换挡、液压机、钟表滴答声1-10 秒
UI / 数字音效通知提示音、按钮点击声、错误蜂鸣声、升级提示音0.1-2 秒
拟音脚步声、布料摩擦声、纸张揉皱声、液体倾倒声1-5 秒
过渡音效呼啸声、嗖的一声、渐强音、反向钹声、短促提示音0.5-3 秒
科幻激光爆炸声、曲速引擎声、力场嗡鸣声、外星人交谈声0.5-5 秒
恐怖地板吱呀声、耳语、远处的尖叫声、心跳声1-10 秒
卡通弹跳声、啪叽声、滑哨声、喜剧喇叭声0.5-2 秒
环境音咖啡馆喧闹声、办公室嗡鸣声、城市交通声、地铁声10-30 秒

提示词技巧

音效提示词公式
Generate a sound effect: [what it is] + [material/texture] + [environment/space] + [duration]
描述声音特质
特质关键词
明亮清脆、尖锐、金属感、鸣响、清晰
低沉深沉、轰鸣、低音、闷响、浑厚
湿润混响、回声、空间感、洞穴感、水下感
干燥近距离收音、紧凑、无混响、亲密感
失真过载、粗粝、削波、饱和
干净纯净、无瑕、数字感、精致
时长指南

请明确指定时长:

"0.5 seconds" — quick hits, clicks, notifications
"1-3 seconds" — impacts, transitions, short effects
"5-10 seconds" — ambient loops, longer foley
"15-30 seconds" — environment ambiences, atmospheric beds
分层说明

要求在一个音效中包含多个元素:

"A thunderclap with: initial crack, rolling rumble that
fades over 5 seconds, light rain in the background throughout"

示例

电影感撞击音效
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a sound effect: cinematic deep bass impact hit followed by a reverb tail that decays over 3 seconds. Like a movie trailer boom. Massive sub-bass presence, felt in the chest. Dry initial hit, then spacious reverb."}],
    "stream": false
  }'
UI 通知音效
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a sound effect: a pleasant, subtle notification chime for a mobile app. Two ascending xylophone-like tones, bright and friendly. 0.5 seconds total. Clean and digital, not overly attention-grabbing. Think premium tech product."}],
    "stream": false
  }'
自然环境音
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a sound effect: a peaceful forest ambience at dawn. Gentle birdsong from multiple species at varying distances, a soft breeze rustling through leaves, a distant stream trickling over rocks. 20 seconds long. Naturalistic and immersive."}],
    "stream": false
  }'
科幻激光
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a sound effect: a futuristic laser blaster firing three rapid shots. Each shot has a sharp zap with a synthesized sizzle tail. High-pitched, energetic, slightly different pitch for each shot. 1.5 seconds total. Sci-fi video game style."}],
    "stream": false
  }'
恐怖氛围
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a sound effect: unsettling horror ambience for a haunted house scene. Low droning hum, occasional distant creaking wood, a faint whisper that passes from left to right, and a single slow heartbeat. 15 seconds. Dark, tense, and deeply unsettling."}],
    "stream": false
  }'

批量生成音效

# Generate a complete UI sound kit
EFFECTS=(
  "Generate a sound effect: app launch whoosh, 0.3 seconds, bright and modern"
  "Generate a sound effect: button tap click, soft and tactile, 0.1 seconds"
  "Generate a sound effect: success completion chime, three ascending notes, 0.8 seconds, cheerful"
  "Generate a sound effect: error notification, two low descending tones, 0.5 seconds, gentle warning"
  "Generate a sound effect: message received ping, single bright bell tone, 0.3 seconds, pleasant"
)

for EFFECT in "${EFFECTS[@]}"; do
  curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
    -H "Content-Type: application/json" \
    -H "X-API-Key: $EACHLABS_API_KEY" \
    -d "{
      \"messages\": [{\"role\": \"user\", \"content\": \"$EFFECT\"}],
      \"stream\": false
    }"
  echo "---"
done

常见问题

  • 未指定时长会让模型自行猜测长度,可能不适合你的项目。请始终指定时长。
  • 描述过于模糊(“很酷的声音”)会产生普通的结果。请通过具体的物理细节描述声音。
  • 期望精确复刻特定受版权保护的声音并不可靠。请改为描述其特征。
  • 忽略环境因素会生成缺乏情境的声音。请提及混响、房间大小和距离,以增强真实感。
  • 请求内容过多,同时包含太多元素可能会使音频变得混浊。请将复杂场景拆分为单独音效,再分层组合。

相关技能

文档

评论

支持 Markdown