Communitygithub.com

sound-fx

根據文字描述產生音效、環境音或短音訊片段,例如腳步聲、爆炸聲、卡通音效或環境雨聲等。

sound-fx 是什麼?

sound-fx 是一個 AI 技能,可根據自然語言文字提示即時產生高品質音效、環境音或短音訊片段。它整合了 Noiz API 的文字轉聲音服務,支援多種輸出格式(WAV、MP3、FLAC),並可自訂音訊長度(1-30 秒)。開發者或 AI 代理使用者可以透過簡單的命令列介面觸發產生,技能內建豐富的範例提示(如動物叫聲、搞笑音效、電影場景配樂及遊戲音效),並可將結果輸出至檔案或整合至 Discord、Telegram、Feishu 等第三方平台。此技能特別適合遊戲開發、影音編輯、Podcast 製作或任何需要快速生成音效的場景。

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

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

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 / -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"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。

系統需求

  • 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.

相關技能