StreamGenius is a powerful Python tool for processing streaming content from YouTube and Spotify. It offers advanced functionalities for audio transcription, text translation, content summarization, and text enrichment.
- 🎥 Process YouTube videos
- 🎵 Handle Spotify tracks and podcasts
- 🎙️ Accurate audio transcription using Whisper AI
- 🌐 Text translation to multiple languages
- 📝 Intelligent content summarization
- 🔤 Text enrichment with synonyms
- 📊 Metadata extraction and processing
-
Clone the repository:
git clone https://github.com/felipepimentel/streamgenius.git cd streamgenius
-
Install dependencies using Poetry:
poetry install
-
Set up environment variables: Create a
.env
file in the project root and add your API keys:OPENAI_API_KEY=your_openai_api_key SPOTIFY_CLIENT_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
-
Activate the Poetry virtual environment:
poetry shell
-
Run the main script with a YouTube or Spotify URL:
python -m src.stream_processor.main <URL> [--output OUTPUT_DIR] [--model MODEL_SIZE]
Options:
<URL>
: The YouTube video or Spotify track URL (required)--output OUTPUT_DIR
: Specify the output directory for results (optional)--model MODEL_SIZE
: Choose the Whisper model size: tiny, base, small, medium, or large (default: tiny)
-
The script will process the content and save the results in the specified output directory or the default
streamgenius_output
folder in your home directory.
src/stream_processor/
: Contains the main project modulesmain.py
: Main entry pointyoutube_processor.py
: YouTube video processingspotify_processor.py
: Spotify track processingtranscription.py
: Audio transcriptiontranslation.py
: Text translationsummarization.py
: Content summarizationenrichment.py
: Text enrichment
tests/
: Contains unit tests for the project
To run the unit tests, use the following command:
pytest
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- OpenAI Whisper for audio transcription
- yt-dlp for YouTube video downloading
- spotdl for Spotify track downloading
- Transformers for NLP tasks