Transform YouTube video comments into an original song! This project analyzes comments from any YouTube video, determines the overall sentiment, and generates both lyrics and audio based on the comment content.
- YouTube Comment Analysis: Fetches and processes comments from any public YouTube video
- Sentiment Analysis: Analyzes the emotional tone of comments (positive, negative, neutral, mixed)
- AI-Powered Lyrics Generation: Creates original song lyrics based on comment content and sentiment
- Audio Generation: Converts the generated lyrics into an actual song with music
- Python 3.8 or higher
- A YouTube API key (for fetching comments)
- Clone the repository:
git clone https://github.com/yourusername/tube-song-creation.git
cd tube-song-creation- Create and activate a virtual environment:
python -m venv .venv
# On Windows
.venv\Scripts\activate
# On Unix or MacOS
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Set up your YouTube API key:
- Get an API key from the Google Cloud Console
- Enable the YouTube Data API v3
- Add your API key to the environment variables or configuration file
- Run the main script:
python main.py-
Enter a YouTube video ID when prompted
-
Wait for the process to complete:
- Comment fetching
- Sentiment analysis
- Lyrics generation
- Audio creation
-
The generated song will be saved as
generated_song.mp3
main.py- Main application entry pointyoutube_comments.py- Handles YouTube API interaction and comment fetchingsentiment_analyzer.py- Analyzes comment sentimentlyrics_generator.py- Generates song lyrics from analyzed commentsaudio_generator.py- Creates audio from generated lyrics
Contributions are welcome! Feel free to submit issues and pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- YouTube Data API for comment access
- Various AI and NLP libraries for sentiment analysis
- Audio generation libraries for music creation
Made with ❤️ by Suhail (https://github.com/demonbruster)