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 / -f | wav | 输出格式:wav、mp3、flac |
--output / -o | output.wav | 保存生成的音频的路径 |
--api-key | 来自环境/配置 | Noiz 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。
要求
安全与数据披露
- API 密钥:存储在
~/.config/noiz/api_key(权限 0600)或通过 NOIZ_API_KEY 环境变量设置。
- 网络:文本提示将发送到
https://noiz.ai/v1/text-to-sound 进行生成。不会传输其他数据。
- 输出:生成的音频从 Noiz 的 GCS URL 下载并保存到本地。