Music Fairy is a script that utilizes speech recognition to play any song audio in MPD (Music Player Daemon). It uses YouTube as a source to fetch music and integrates with various libraries and tools to provide a seamless music playback experience.
To install Music Fairy, follow these steps:
-
Clone the repository from GitHub: github.com/bugswriter/music_fairy
-
Copy the
music-fairy
script into~/.local/bin
on your system. -
Install the required Python packages by running the following commands:
pip3 install vosk
pip3 install yt-dlp
pip3 install google_speech
-
Ensure that
ffmpeg
is installed on your system. -
Download the Vosk model from alphacephei.com/vosk/models. It is recommended to download the lighter model with a smaller file size.
-
Put the model directory in
~/.local/share/music_fairy/
, or change theVOSK_MODEL_PATH
variable to the path where you downloaded the Vosk model. -
Bind Music Fairy to a specific key using your system's keybinding configuration.
Once installed and configured, you can use Music Fairy to play songs by following these steps:
-
Activate the speech recognition by pressing the bound key.
-
Speak the name of the song or artist you want to play.
-
Music Fairy will fetch the audio from YouTube and play it using MPD.
-
Enjoy your music!
Please note that a working internet connection is required for Music Fairy to fetch music from YouTube.
- GPL-3
- Checkout my donate page - bugswriter.com/donate