MusicGen-Minimal v1.1.0
Text-to-music generation that actually works. No bullshit, just music.
What This Does
- 🎵 Generates music from text descriptions
- 🚀 Extended generation beyond 30 seconds (NEW)
- 📦 Batch processing from CSV files (NEW)
- 🎧 MP3 output support (NEW)
- 📊 Real-time progress bars (NEW)
- ✅ Uses Facebook's MusicGen model
- 💻 Works on CPU (slow) or GPU (fast)
What This Doesn't Do
- No web interface (yet)
- No real-time generation
- No style transfer
- No MIDI export
- No audio conditioning
Installation
⚠️ Reality Check: This package downloads 2.7GB of dependencies (PyTorch, etc.) on first install.
# Basic installation
pip install musicgen-minimal
# With MP3 support
pip install 'musicgen-minimal[audio]'
First install includes:
- PyTorch (2.1GB) - ML framework
- Transformers (400MB) - HuggingFace models
- Other dependencies (300MB)
- Total: ~2.7GB download, ~7GB disk space
Optional MP3 support:
- Install pydub:
pip install pydub - Install ffmpeg: https://ffmpeg.org/download.html
- Without these, falls back to WAV output
First use downloads model:
- Small model: 300MB (recommended)
- Medium model: 1.5GB (better quality)
- Large model: 3.2GB (best quality)
Usage
Basic Generation
# Generate 10 seconds of music
musicgen generate "upbeat jazz piano" --duration 10
# Generate 2-minute track (uses extended generation)
musicgen generate "epic orchestral symphony" --duration 120
# Generate with MP3 output (requires pydub)
musicgen generate "lofi hip hop" --output beats.mp3
# Disable progress bars
musicgen generate "ambient nature sounds" --no-progress
Batch Processing
# Create sample CSV template
musicgen create-sample-csv
# Process multiple tracks from CSV
musicgen batch playlist.csv
# Parallel processing with 4 workers
musicgen batch jobs.csv --workers 4
Python API
from musicgen import quick_generate
# Generate 60-second MP3
quick_generate(
"cinematic trailer music",
"trailer.mp3",
duration=60,
format="mp3",
bitrate="320k"
)
Performance (Brutal Honesty)
CPU Performance (Most Users)
- Model loading: ~30 seconds
- Generation speed: 0.1x realtime (10x slower)
- 30-second song: ~5 minutes
- 2-minute song: ~20 minutes
- Memory usage: ~4GB RAM
GPU Performance (CUDA)
- Model loading: ~5 seconds
- Generation speed: 2-5x realtime
- 30-second song: ~10 seconds
- 2-minute song: ~40 seconds
- Memory usage: ~4GB VRAM
⚠️ WARNING: Long generations on CPU will test your patience!
Why So Simple?
Because it actually works. The original project had 343 files and didn't run. This has 4 files and ships music.
What's New in v1.1.0
Extended Generation
- Generate music longer than 30 seconds (up to unlimited duration)
- Automatic segment blending with crossfade
- Progress tracking for multi-segment generation
Batch Processing
- Process multiple tracks from CSV files
- Parallel generation with multiprocessing
- Mixed format support (WAV and MP3 in same batch)
MP3 Output
- 75-90% smaller files than WAV
- Configurable bitrate (128k-320k)
- Graceful fallback if dependencies missing
Progress Bars
- Real-time progress for all operations
- ETA calculation for long generations
- Optional --no-progress for automation
Contributing
Keep it simple. If your PR adds more than 50 lines, it's too complex.
Metadata
Release files for musicgen-minimal 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| musicgen_minimal-1.1.2.tar.gz | 25.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| musicgen_minimal-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.2 kB
Release files / musicgen_minimal-1.1.2.tar.gz
| Download URL | musicgen_minimal-1.1.2.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d1b3862c5d617ee2c89229552e0ff6931085913e4a2a0bc45929dbb6bd99c4b
|
|
BLAKE2b-256 checksum How to use checksums |
19999da799b9b6953a8879dcd01cb5c9e7e739ac8a5348550d5a84f5525fefb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / musicgen_minimal-1.1.2-py3-none-any.whl
| Download URL | musicgen_minimal-1.1.2-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
038701c5f07eec3ce3a53d0e3a1106d115cabb3faef9ef055529cbaaf9748012
|
|
BLAKE2b-256 checksum How to use checksums |
205b28371f54a5a22312b48924d5cb8fc30d016ed8d6a57a770924704839bb26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|