I got a local model to run as a 24/7 radio DJ, picks the tracks, writes the intros, takes plain-language requests

I got a local model to run as a 24/7 radio DJ, picks the tracks, writes the intros, takes plain-language requests

Creating a 24/7 Radio DJ Using a Local Language Model: A Guide to Building Your Own AI-Powered Station

In the age of AI, creative projects often push the boundaries of what’s possible with local machine learning models. Recently, I embarked on an engaging project: transforming my local environment into a continuous, AI-powered radio station. This station features a language model acting as a radio DJ, responsible for selecting tracks, crafting intros, and responding to listener requests—all powered entirely from my own music library and run locally.

Why Build a Local Radio Station?

While many use chatbots or AI for conversation, I wanted to go beyond simple interactions. My goal was to create an autonomous, live-streaming radio station that operates around the clock, offering a personalized experience driven by a local language model (LLM). This project provides a fun yet practical example of how AI can be integrated into personal media projects, with the flexibility of local deployment.

Technical Foundations

The core of this setup is an Ollama AI box, which hosts the language model. The station streams continuously, handling music selection, commentary, weather updates, and listener requests—all seamlessly managed by the LLM.

The AI DJ: How It Works

The AI’s decision-making process is structured into two primary modes:

  1. Agentic Loop Mode:
  2. This is the default operation.
  3. The model is equipped with library-search tools and session memory.
  4. It reasons about which track to play next, ensuring coherent and engaging playlists.

  5. Pool Picker Mode:

  6. A simplified approach.
  7. A pre-compiled shortlist of candidate tracks, along with recent plays, is queried to select the next song.
  8. This mode uses fewer tokens, making it more efficient, and automatically falls back if the agent stalls, preventing silence on air.

Customization and Flexibility

The system’s provider can be swapped dynamically via the Vercel AI SDK. The default is Ollama with no API key required, but you can easily switch to other providers like Anthropic or OpenAI through the admin UI—no need for redeployment. This flexibility allows tuning the personality and style of intros and interactions to suit your preferences.

Music Recommendations & Similarity Matching

When a listener requests a “similar” track, the system employs vector-based lookup, not just genre tags. Each track in the library is embedded into a learned vector space. Additionally, the system can generate an audio fingerprint using CLAP to analyze the actual sound profile, enabling more accurate “sounds-like” recommendations.

Hardware & Library Requirements

This project requires a local Linux server with either Navidrome or Subsonic as the music library backend. The models are hosted locally, which means all processing stays on your hardware, ensuring privacy and eliminating dependency on external APIs. Keep in mind that smaller models are slower but tend to be wittier, while larger models perform better at reasoning and creative tasks.

Open Source & Live Demo

The entire system is open source under the MIT license. Interested in hearing the AI DJ in action? Visit the live demo: https://www.getsubwave.com/listen. It features a real-time stream of the station, showcasing how a local language model can serve as a personable, responsive DJ.

Repository and Further Details

You can explore the full code and instructions at the GitHub repository: https://github.com/perminder-klair/subwave. Whether you’re a developer, hobbyist, or AI enthusiast, this project demonstrates how accessible and customizable local AI models can be for personal media projects.

Final Thoughts

Building a local AI-powered radio station is a rewarding way to experiment with foundational machine learning tools, music libraries, and streaming technology—all within your own environment. It’s a practical example of how open-source AI can be used creatively, giving you full control over your AI DJ’s personality, song choices, and interactions.


Interested in experimenting with your own AI-radio station? Dive into the project, customize the experience, and enjoy your very own 24/7 AI DJ!

Note: This project was personally developed by the author.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *