sound-fx 是做什麼的?
根據文字描述產生任何音效 —— 腳步聲、爆炸聲、卡通音效、環境雨聲,或者你能想像到的任何聲音。
觸發條件
- 音效 / 音效製作 / 擬音
- 產生聲音 / 製造聲音 / 建立音訊
- 環境音 / 背景噪音
- 某個聲音聽起來如何 / 發出某種聲音
- 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" | 8 秒 |
"cat hissing and yowling aggressively" | 3 秒 |
"cat knocking a glass off the table, crash" | 2 秒 |
"dog sneezing three times in a row" | 3 秒 |
"small dog barking excitedly at a doorbell" | 4 秒 |
"dog howling dramatically at the moon" | 5 秒 |
"dog eating food really fast, chomping and gulping" | 4 秒 |
"hamster running furiously on a squeaky wheel" | 6 秒 |
"parrot perfectly mimicking a phone ringing" | 3 秒 |
"frog croaking in a pond at night" | 8 秒 |
😂 搞笑與表情類
| 提示 | 建議時長 |
|---|
"cartoon character getting spanked, exaggerated squeaky yelp" | 2 秒 |
"dramatic fail horn (wah wah wah wah)" | 3 秒 |
"someone sitting on a whoopee cushion mid-meeting" | 2 秒 |
"anime power-up charging sound" | 5 秒 |
"someone slipping on a banana peel, cartoon slide and crash" | 3 秒 |
"dramatic chipmunk stare — suspenseful strings" | 3 秒 |
"rubber duck squeak three times" | 2 秒 |
"evil villain laugh echoing in a dungeon" | 5 秒 |
"crowd gasping in disbelief" | 3 秒 |
"a notification sound that sounds passive-aggressive" | 2 秒 |
"someone aggressively typing on a mechanical keyboard" | 5 秒 |
🌍 環境與氣氛類
| 提示 | 建議時長 |
|---|
"heavy rain and thunder on a metal roof" | 15 秒 |
"busy coffee shop, background chatter and espresso machine" | 15 秒 |
"old dial-up modem connecting to the internet" | 10 秒 |
"campfire crackling at night, crickets in background" | 15 秒 |
"ocean waves gently crashing on a beach" | 15 秒 |
🎮 動作與科幻類
| 提示 | 建議時長 |
|---|
"spaceship laser blaster" | 2 秒 |
"monster truck engine revving" | 5 秒 |
"sword being unsheathed from scabbard" | 2 秒 |
"video game level-up fanfare" | 3 秒 |
輸出
成功時,音訊檔案會儲存到指定的輸出路徑,並印出 URL:
✓ Saved to output.wav (3.2s, 282 KB)
URL: https://storage.googleapis.com/...
第三方整合
若要將產生的音效傳送至 Discord、Telegram、Feishu,或透過 ffmpeg 與影片混合,請參閱 ref_3rd_party.md。
系統需求
安全與資料揭露
- API 金鑰:儲存在
~/.config/noiz/api_key(權限 0600)或透過環境變數 NOIZ_API_KEY 設定。
- 網路:文字提示會傳送至
https://noiz.ai/v1/text-to-sound 進行生成。不會傳輸其他資料。
- 輸出:產生的音訊會從 Noiz GCS URL 下載並儲存在本地端。