Morning Radio is a set of Python scripts that allows you to generate a personalized broadcast for your morning commute. You write a script using a Jupyter Notebook, and it uses a local LLM to generate the script and a local TTS system to synthesize it into audio.
Example of Generated Broadcast
2025-02-02.mp4
- 📻 Personalized morning broadcasts tailored to your interests and routines.
- 🧠 Fully local, totally private.
- ⏰ Includes a scheduling system that automatically generates and publishes the podcast at a specified time
- 🎙️ Comes with a built-in podcast server for easy access to generated broadcasts.
Before running the script, make sure you have GCC and Make installed on your system.
git clone https://github.com/smy20011/MorningRadio
cd MorningRadio
UV is recommended for running the system. It makes package installation much easier. To run the entire system (including the podcast server), use:
uv run make serve
UV will install the packages, create the virtual environment, and run the command within the virtual environment. The script will download the model files and start generation. After generation is finished, a server will be running at http://localhost:5000 with a list of generated podcasts.
We also provide a requirements.txt
file for you to install packages in a virtual environment. In a virtual environment, use:
pip install -r requirements.txt
make serve
to start the broadcast generation and podcast server.
Once generated, the podcast will be available on the local network. However, if you want to listen to the podcast from a remote location, you need to either:
- Expose port 5000 to the public network and ensure you have a static IP address.
- Use a VPN (like Tailscale) to connect to your podcast host.
I use the second option since it's easier and more secure.
This project is meant to be forked and modified to fit your needs.
Change the Morning.ipynb
file to change the content of the broadcast. You can add any cell to change the content. You can use print statements to print the prompt you want to send to the LLMs, for example, adding a cell with:
print("Hello Foo")
will add "Hello Foo" to the prompt being sent to the LLM.
Morning Radio uses Quatro to convert the .ipynb
file to Markdown format. See the Quatro website for more information.
I use LLAMA 3b to convert the output of the .ipynb
file to the broadcast script. To use a more advanced model or a non-local model, you can change the Makefile, pointing the model to a new location. $(MODEL)
needs to be a model in GGUF format.
$(TEXT_FILE): $(MD_FILE) $(MODEL)
python llm.py --model $(MODEL) --input $(MD_FILE) --output $(TEXT_FILE)
To change model parameters, you can change llm.py
. I use the llama_cpp
Python package to run the local model. Please refer to the llama_cpp
documentation for customization tips.
I use Kokoro to convert text to audio. To customize the voice or speed, change tts.py
to fit your needs.
You can change the schedule_gen.py
to change the time of generation. It's a simple script that call the make
command.
schedule.every().day.at("07:30").do(make)