Communitygithub.com

sound-fx

使用此技能可通过文本描述生成音效、环境音频或短音频片段。触发词包括:任何提及“音效”、“声音”、“音频效果”等的内容。

sound-fx 是什么?

sound-fx 是一个 AI 技能,允许开发者通过简单的文本提示生成自定义音效、环境音频或短音频片段。该技能通过调用 Noiz API 将自然语言描述转换为音频文件,支持多种输出格式(WAV、MP3、FLAC),并提供可选的持续时间参数(1-30 秒)。它适用于 Claude Code、Cursor 和 Codex 等 AI 代理平台,简化了音效生成流程。无需手动录制或搜索音效库,开发者只需输入像“a cat purring contentedly, deep rumbling vibration”这样的提示,即可在几秒内获得高质量的音频文件。技能提供丰富的示例提示,涵盖动物、搞笑、环境、动作和科幻等类别,并支持与其他工具(如 Discord、Telegram、飞书、ffmpeg)集成。配置简单,只需保存 API 密钥一次,即可通过命令行或环境变量使用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/noizai/skills/tree/main/skills/sound-fx

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

sound-fx 是做什么的?

通过文本描述生成任意音效——脚步声、爆炸声、卡通弹跳声、环境雨声,或任何你能想到的声音。

触发器

  • 音效 / sfx / 拟音
  • 生成声音 / 制造声音 / 创建音频
  • 环境声音 / 背景噪音
  • X 听起来像什么 / 制造 X 的声音
  • sound effect / sfx / foley
  • generate sound / make a sound / create audio
  • ambient sound / background noise
  • what does X sound like / make the sound of X

快速入门

# 动物
python3 skills/sound-fx/scripts/sfx.py "a cat purring contentedly, deep rumbling vibration" -d 8
python3 skills/sound-fx/scripts/sfx.py "dog sneezing three times in a row" -d 3
python3 skills/sound-fx/scripts/sfx.py "dog eating food really fast, chomping and gulping" -d 4

# 搞笑
python3 skills/sound-fx/scripts/sfx.py "cartoon character getting spanked, exaggerated squeaky yelp" -d 2
python3 skills/sound-fx/scripts/sfx.py "someone sitting on a whoopee cushion mid-meeting" -d 2

# 环境(保存到文件)
python3 skills/sound-fx/scripts/sfx.py "heavy rain on a tin roof" -d 15 -o rain.wav
python3 skills/sound-fx/scripts/sfx.py "campfire crackling at night, crickets in background" -d 15 -o campfire.wav

参数

参数默认值描述
prompt必需要生成声音的文本描述
--duration / -d自动时长(秒),范围 1–30。省略则让模型决定。
--format / -fwav输出格式:wav、mp3、flac
--output / -ooutput.wav保存生成的音频的路径
--api-key来自环境/配置Noiz API 密钥(覆盖已存储的密钥)

配置

# 一次性保存你的 API 密钥
python3 skills/sound-fx/scripts/sfx.py config --set-api-key YOUR_KEY

# 或者通过环境变量设置
export NOIZ_API_KEY=YOUR_KEY

在 developers.noiz.ai 获取你的 API 密钥。

有趣的示例提示

🐾 动物

提示建议时长
"a cat purring contentedly, deep rumbling vibration"8s
"cat hissing and yowling aggressively"3s
"cat knocking a glass off the table, crash"2s
"dog sneezing three times in a row"3s
"small dog barking excitedly at a doorbell"4s
"dog howling dramatically at the moon"5s
"dog eating food really fast, chomping and gulping"4s
"hamster running furiously on a squeaky wheel"6s
"parrot perfectly mimicking a phone ringing"3s
"frog croaking in a pond at night"8s

😂 搞笑与夸张

提示建议时长
"cartoon character getting spanked, exaggerated squeaky yelp"2s
"dramatic fail horn (wah wah wah wah)"3s
"someone sitting on a whoopee cushion mid-meeting"2s
"anime power-up charging sound"5s
"someone slipping on a banana peel, cartoon slide and crash"3s
"dramatic chipmunk stare — suspenseful strings"3s
"rubber duck squeak three times"2s
"evil villain laugh echoing in a dungeon"5s
"crowd gasping in disbelief"3s
"a notification sound that sounds passive-aggressive"2s
"someone aggressively typing on a mechanical keyboard"5s

🌍 环境与氛围

提示建议时长
"heavy rain and thunder on a metal roof"15s
"busy coffee shop, background chatter and espresso machine"15s
"old dial-up modem connecting to the internet"10s
"campfire crackling at night, crickets in background"15s
"ocean waves gently crashing on a beach"15s

🎮 动作与科幻

提示建议时长
"spaceship laser blaster"2s
"monster truck engine revving"5s
"sword being unsheathed from scabbard"2s
"video game level-up fanfare"3s

输出

成功后,音频文件将保存到输出路径,并打印 URL:

✓ Saved to output.wav (3.2s, 282 KB)
  URL: https://storage.googleapis.com/...

第三方集成

要将生成的音效发送到 Discord、Telegram、飞书,或使用 ffmpeg 将其混入视频中,请参阅 ref_3rd_party.md。

要求

  • Python 3.6+
  • requests 包:pip install requests
  • 来自 developers.noiz.ai 的 Noiz API 密钥

安全与数据披露

  • API 密钥:存储在 ~/.config/noiz/api_key(权限 0600)或通过 NOIZ_API_KEY 环境变量设置。
  • 网络:文本提示将发送到 https://noiz.ai/v1/text-to-sound 进行生成。不会传输其他数据。
  • 输出:生成的音频从 Noiz 的 GCS URL 下载并保存到本地。

Individual skills in this repo

This repo contains 6 individual skills — each has its own dedicated page.

相关技能