This is a Streamlit-based MP3 Scheduler that allows you to schedule alarms that play an MP3 file at specific times.
- Add alarms for specific times of the day.
- Persistent storage using a text file (
alarms.txt). - Automatic playback of an MP3 file when an alarm is triggered.
- Easy removal of scheduled alarms.
- Modern web-based UI using Streamlit.
Before running the application, install the required Python packages:
pip install streamlit pydub ffmpegFFmpeg is required for PyDub to play MP3 files.
- Ubuntu/Debian:
sudo apt install ffmpeg
- MacOS (Homebrew):
brew install ffmpeg
- Windows:
- Download FFmpeg from ffmpeg.org.
- Add the FFmpeg
bindirectory to your systemPATH.
Run the following command in the project directory:
streamlit run mp3_scheduler.pyThis will start the Streamlit web app, and you can access it in your browser.
- Set Time (HH:MM) - Enter a time in
HH:MMformat. - Click "Add Time" - Adds the alarm to the scheduled list.
- View Scheduled Alarms - Alarms are displayed in a two-column layout.
- Delete Alarms - Click the 🗑️ icon to remove an alarm.
- Alarms Automatically Play - The app will play
school-bell.mp3at the exact scheduled time.
📁 MP3_Scheduler
│── mp3_scheduler.py # Main Streamlit application
│── alarms.txt # Stores scheduled alarms
│── school-bell.mp3 # Alarm sound file
│── requirements.txt # Dependencies for the app
- Ensure FFmpeg is installed and working.
- Check if
school-bell.mp3exists in the project directory.
- If an alarm is added but the UI does not update, try refreshing the page.
- The app must remain running for alarms to work.
- Alarms persist in
alarms.txtand will be reloaded when the app starts.
This project is open-source and free to use.