2025-07-18 01:12:16 +02:00
2025-07-18 01:12:16 +02:00
2025-07-18 01:12:16 +02:00
2025-07-18 01:12:16 +02:00

Infinite Sound

Generate infinite music by describing it with text powered by Stable Audio Open and a simple local UI.
Your prompt, your vibe, your AI-generated audio.
Runs entirely on your own computer.


Features

  • Infinite audio: Looped and crossfaded seamless output.
  • Custom prompt: Describe the vibe, setting, or instruments you want.
  • Local, fast, and hackable: Runs on Mac/Windows/Linux (MPS, CUDA or CPU).
  • Save generated clips.
  • GUI made with PyWebview.

Requirements


Setup

  1. Clone this repository

    git clone https://giers10.uber.space/giers10/infinite-sound
    cd infinite-sound
    
  2. Install dependencies

    pip install -r requirements.txt
    

    (Or with poetry: poetry install)

  3. Get access to the model & authenticate (one-time Hugging Face login):

huggingface-cli login

Paste your token and press Enter.
You should see “Token is valid”.
(This is required before first run!)

Tip: If you skip the huggingface-cli login step, the program will not be able to download or load the model and will throw a 401 error.

You may need ffmpeg installed for pydub to work. On Mac: brew install ffmpeg. On Windows: download from ffmpeg.org and add to PATH.


Usage

python infinite-sound.py

On first run, the script will automatically download the AI model (ca 2 GB) from Hugging Face.

Controls

  • Play/Pause: Start or stop the infinite music loop.
  • Prompt: Enter any text (e.g., "medieval tavern, rain outside, soft lute").
  • Volume: Set the output volume.
  • Record toggle: Enable/disable saving each generated clip. Audio clips are saved in the clips/ folder if recording is enabled.

FAQ & Troubleshooting

Q: I get a black window, and nothing loads!
A: Make sure you have a working version of pywebview and a supported browser backend (see below).

Q: “Model load failed” or “Invalid HuggingFace token”?
A: Double-check you pasted a correct access token and accepted the model license on Hugging Face.

Q: Which browser/desktop backends are supported?
A: pywebview uses system-native browser engines. On Mac, you need Python installed via Homebrew or python.org for best results.

Q: How do I speed up generation?
A: Use a GPU (MPS on Mac, CUDA on Nvidia). This is automatic if you have the hardware and drivers.


Credits


License

MIT

Author

Victor Giers

Description
No description provided
Readme 24 KiB
Languages
Python 100%