[Project Banner Image]
LyricMind-AI is an advanced deep learning model that generates creative and contextually relevant song lyrics. Built with PyTorch and Flask, it uses LSTM architecture to understand and generate human-like lyrics across different musical genres.
- Creative Lyrics Generation: Generate unique and contextually relevant lyrics from any prompt
- Genre-Aware: Supports multiple music genres including Pop, Rock, Hip Hop, Country, and Jazz
- Temperature Control: Adjust creativity vs. coherence with temperature parameter
- User-Friendly Interface: Clean, modern web interface for easy interaction
- Real-Time Generation: Fast response times with asynchronous processing
[Screenshot of Web Interface]
- Python 3.8 or higher
- pip (Python package manager)
- Git
- 4GB+ RAM recommended
- CUDA-capable GPU (optional, for faster training)
-
Clone the Repository
git clone https://github.com/AMIRHaytham/lyricMind-AI.git cd lyricMind-AI
-
Set Up Virtual Environment
# Windows python -m venv venv .\venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install Dependencies
pip install -r requirements.txt
-
Download Required Data
- Download the datasets:
- Place the files in the project root directory
- Start the server:
python app.py
- Open
http://localhost:5000
in your browser - Enter your prompt and adjust parameters
- Click "Generate Lyrics"
from lyricmind import LyricGenerator
# Initialize generator
generator = LyricGenerator(
genre='pop',
model_path='best_model.pth',
vocab_path='vocab.json'
)
# Generate lyrics
lyrics = generator.generate(
prompt="In the midnight hour",
temperature=0.7,
max_length=100
)
Generate lyrics from a prompt.
Request Body:
{
"prompt": "In the midnight hour",
"temperature": 0.7,
"max_length": 100,
"genre": "pop"
}
Response:
{
"lyrics": "Generated lyrics...",
"error": null
}
For detailed API documentation, see our API Reference Guide.
LyricMind-AI uses a deep learning architecture based on LSTM networks:
Input Text → Embedding → LSTM → Dropout → Linear → Softmax → Output
- Embedding Layer: 64 dimensions, ~50,000 word vocabulary
- LSTM Layer: 128 hidden units, single layer, 0.3 dropout
- Output Layer: Linear transformation with softmax activation
- Dataset: 1M+ lyrics across multiple genres
- Training Parameters:
- Batch Size: 64
- Learning Rate: 0.001
- Epochs: 50
- Optimizer: Adam
We welcome contributions! Please see our Contributing Guidelines for details on:
- Code of Conduct
- Development Process
- Pull Request Process
- Style Guidelines
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Amir Haytham | GitHub