This Python script allows you to search for songs on YouTube or Spotify, select a song, and play it directly. It provides an interactive menu to choose a platform for searching and plays the song once selected.
-
Clone this repository:
git clone https://github.com/OTAKUWeBer/AuraPlay cd AuraPlay -
Install required dependencies:
pip install -r requirements.txt
Additionally, make sure to have FFmpeg and yt-dlp installed for audio handling and YouTube playback.
-
Linux:
- Install FFmpeg:
sudo apt install ffmpeg(for Ubuntu/Debian-based systems) orsudo pacman -S ffmpeg(for Arch Linux). - Install yt-dlp:
sudo pip install yt-dlp
- Install FFmpeg:
-
MacOS:
- Install FFmpeg:
brew install ffmpeg - Install yt-dlp:
brew install yt-dlp
- Install FFmpeg:
-
Windows:
-
-
Run the application:
python app.py
-
Follow the prompts:
- Choose the platform (YouTube or Spotify).
- Select the song you want to play.
To use the Spotify search and playback functionality, you need a Spotify API client ID and secret.
- Go to the Spotify Developer Dashboard.
- Log in with your Spotify account.
- Click Create an App and enter the required details.
- Once created, you’ll see your Client ID and Client Secret on the app dashboard.
After obtaining the Client ID and Client Secret, create a .env file in the project directory to securely store your credentials:
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secretReplace your_client_id and your_client_secret with your actual Spotify credentials.
- YouTube Playback: The script uses
yt-dlpto fetch and stream videos from YouTube. Ensureyt-dlpis installed and accessible in your system PATH. - Spotify Playback: The script uses
spotipyfor Spotify API integration.