Infinite Radio: The AI DJ That Adapts Music Genres to Your Screen

8月4日 Published inMusic Players

Infinite Radio is a real-time AI DJ that generates and adapts music genres based on your digital environment. By analyzing your current activity, the system shifts its soundscape to match your workflow. This setup integrates Google Magenta's music models with an intelligent context engine, offering two distinct DJ modes: one that triggers style changes based on your active desktop processes, and another that utilizes vision-language models (like InternVL3) to scan your screen and select music that fits your visual context.

Local Setup for the Music Model

To run the music generation model locally, your system must meet the following requirements:

  • Docker with GPU support enabled
  • An NVIDIA GPU with CUDA compatibility
  • NVIDIA Container Toolkit installed

Start the Music Container

Pull and launch the Docker image with the following command:

docker run --gpus all --network host lauriewired/musicbeats:latest

Once the container is active, navigate to http://127.0.0.1:8080 in your web browser. Click the play button to begin streaming the generated audio.


Running the DJ

You can interact with Infinite Radio through three different methods depending on your platform and preferred level of automation.

Option 1: macOS Application

The macOS version resides in your menu bar, serving as a central hub to launch the Process DJ or connect to the LLM DJ.

Note: The application requires screen recording permissions to analyze your display and determine the appropriate musical genre.

Download Download the latest .app file from the releases page and launch it. Infinite Radio will appear in your system tray.

In the app settings, input the IP address and port of your running music container. From there, you can toggle between DJ modes. The Process DJ works immediately; the LLM DJ requires a running model server (refer to the LM Studio setup in Option 3).

Option 2: Process DJ via Python

The Process DJ monitors your operating system's active tasks. It automatically shifts the musical style based on which application currently has focus.

python process_dj.py 127.0.0.1 8080

Replace the IP and port with the specific address of your music container.

Option 3: LLM DJ via Python

The LLM DJ performs visual analysis of your screen to select a genre that matches your current content—whether you are coding, gaming, or browsing.

Setting up the LLM in LM Studio

  1. Download InternVL3 (or a similar vision-to-text model) within LM Studio.
  2. Start the local server.
  3. The server will provide OpenAI-compatible endpoints:
    • GET /v1/models
    • POST /v1/chat/completions
    • POST /v1/completions
    • POST /v1/embeddings

Connecting the Script Run the following command to link the vision analysis to the music generator:

python llm_dj.py 127.0.0.1 8080

Again, ensure the IP and port match your music container's configuration.


API Endpoints

You can also manually control the music engine through the following endpoints:

Change the Genre POST /genre

curl -X POST http://localhost:8080/genre \
  -H "Content-Type: application/json" \
  -d '{"genre": "jazz"}'

Check the Current Genre GET /current-genre

curl http://localhost:8080/current-genre

Building the macOS Application

If you prefer to package the application manually from the source code, use the following commands:

pip install py2app jaraco.text setuptools
python3 setup.py py2app