SFX Generator is a local sound effect generation app that uses Stable Audio 3 Small SFX via a FastAPI backend and a static SPA frontend, with REST APIs for generation, editing, and preset management.

Stars

31

7-day growth

No data

Forks

2

Open issues

0

License

No data

Last updated

2026-07-12

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It combines a state-of-the-art AI sound effect model with a practical, locally‑runnable API server and an intuitive web UI, making professional‑quality SFX generation accessible without cloud dependencies.

Who it is for

  • Sound designers and audio engineers
  • Game developers needing quick SFX prototyping
  • Indie developers with limited budgets
  • AI/ML enthusiasts exploring audio generation

Use cases

  • Generating custom sound effects for video games
  • Rapid audio prototyping for multimedia projects
  • Creating sound variations from preset categories
  • Educational demonstration of local AI audio generation

Strengths

  • Local execution with no cloud dependency once model is downloaded
  • Comprehensive REST API for integration with external tools
  • Includes ~40 built‑in presets plus custom prompt support
  • Supports audio trimming (cut) with undo functionality

Considerations

  • Requires a Hugging Face account and license approval for the model
  • Depends on a separate local LLM for translation (Japanese to English)
  • First run downloads a large model file and may fail without prior setup

README quick start

SFX Generator

Stable Audio 3 Small SFX を使ったローカル効果音生成アプリ。 バックエンド: FastAPI(単独起動、外部アプリからREST呼び出し可)。フロントエンド: 静的SPA(FastAPIが配信)。

起動方法

cd /home/animede/sound-efect
./venv/bin/python -m app.main                  # host/port は既定値(0.0.0.0:8600)
./venv/bin/python -m app.main --port 8080       # ポート変更
./venv/bin/python -m app.main --reload          # 開発用オートリロード
# または
./venv/bin/uvicorn app.main:app --port 8600

ブラウザで http://:8600/ を開く。

初回起動時、stable_audio_3.StableAudioModel.from_pretrained("small-sfx") がバックグラウンドスレッドで Hugging Face からモデルをダウンロードする。stabilityai/stable-audio-3-small-sfx のゲート(ライセンス同意)が未承認だと 403 で失敗し、そのエラーは /api/statusmodel_error に保持される (生成エンドポイントは 503 を返す)。承認後は huggingface-cli login 等でトークンを設定してから再起動すること。

設定(環境変数)

変数既定値説明
SFX_HOST0.0.0.0待受ホスト
SFX_PORT8600待受ポート
SFX_MODELsmall-sfxStableAudioModel.from_pretrained に渡すモデル名
SFX_DEVICEcudacuda / cpu
SFX_DATA_DIR./generatedWAV と sounds.db の置き場所
SFX_LLM_URLhttp://127.0.0.1:64652/v1翻訳用ローカルLLM(OpenAI互換API)
SFX_LLM_MODELunsloth/gemma-4-E4B-it-GGUF翻訳に使うモデル名

API 一覧

すべて JSON。エラーは {"detail": "..."}

メソッドパス説明
GET/api/statusモデル/翻訳サーバの状態
GET/api/presetsプリセット一覧(約40種)
POST/api/generate効果音を生成(prompt または preset_id)
GET/api/sounds生成済み一覧(新しい順)
GET/api/sounds/{id}1件取得
GET/api/sounds/{id}/audio?download=0|1WAV 取得/ダウンロード
PATCH/api/sounds/{id}改名({"name": "..."})
DELETE/api/sounds/{id}削除
POST/api/sounds/{id}/cut区間削除({"start_s", "end_s"})
POST/api/sounds/{id}/undo直前のカットを1段階アンドゥ
GET/static/index.html を配信

詳細な仕様(リクエスト/レスポンスの形状、バリデーション)は docs/DESIGN.md を参照。

ディレクトリ構成

app/            FastAPI バックエンド
  main.py       起動エントリポイント
  config.py     設定(環境変数)
  sfx_model.py  StableAudioModel ラッパー
  translate.py  日本語→英語翻訳
  store.py      SQLite + WAV 管理
  presets.py    プリセット定義
  routers/api.py  /api/* エンドポイント
static/         フロントエンド(素のHTML/CSS/JS, wavesurfer.js vendor同梱)
generated/      生成された WAV と sounds.db(git管理外)
docs/DESIGN.md  API契約

ライセンス

本アプリは音声生成に Stability AI の Stable Audio 3 Small SFX モデル

Description

easy sound-efect generater

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482