Loading repository data…
Loading repository data…
aquacommander / repository
⭐This project is an API wrapper around stable model that generates tempo consistent, key and scale consistent music loops from text prompts. It also supports lyrics and vocal generation when available, providing a unified interface for both instrumental and vocal audio creation.⭐
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A fully cross-platform audio generation system using Stability AI's Stable Audio Open (small) model. This project generates musical loops from text prompts using C++ and ONNX Runtime for true native performance on Windows, macOS, Linux, Android, and iOS.
stabilityai/stable-audio-open-small model locally via ONNX RuntimeThis project uses C++ with ONNX Runtime for cross-platform compatibility:
See BUILD.md for platform-specific instructions.
Quick example (macOS/Linux):
cd third_party
wget https://github.com/microsoft/onnxruntime/releases/download/v1.15.0/onnxruntime-linux-x64-1.15.0.tgz
tar -xzf onnxruntime-linux-x64-1.15.0.tgz
mv onnxruntime-linux-x64-1.15.0 onnxruntime-linux
# Install Python dependencies (only needed for conversion)
pip install torch onnx transformers diffusers huggingface_hub
# Convert model
python scripts/convert_to_onnx.py \
--model-id stabilityai/stable-audio-open-small \
--output models/stable_audio.onnx
macOS/Linux:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . -j$(nproc)
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A x64
cmake --build . --config Release
./build/bin/stable_audio_cli \
--model models/stable_audio.onnx \
--prompt "120 BPM, 4 bar loop, electric piano, C major" \
--output output.wav \
--seconds 11 \
--seed 42
stable-audio-generator/
├── cpp/ # C++ core library
│ ├── include/ # Public headers
│ ├── src/ # Implementation
│ ├── cli/ # Command-line tool
│ └── CMakeLists.txt # Build configuration
├── scripts/ # Python utilities
│ └── convert_to_onnx.py # Model conversion script
├── models/ # ONNX models (generated, not in git)
├── third_party/ # ONNX Runtime (downloaded separately)
├── BUILD.md # Detailed build instructions
├── README_CPP.md # C++ version quick start
├── ARCHITECTURE.md # Architecture documentation
└── CPP_MIGRATION_SUMMARY.md # Migration details
stable_audio_cli \
--model models/stable_audio.onnx \
--prompt "Your text prompt" \
--output output.wav \
--seconds 11 \
--bars 4 \
--bpm 120 \
--key C \
--seed 42 \
--device cpu
Parameters:
--model (required): Path to ONNX model file--prompt (required): Text description of desired audio--output: Output WAV file path (default: output.wav)--seconds: Length in seconds (default: 11.0)--bars: Number of musical bars (overrides seconds)--bpm: Beats per minute (default: 120)--key: Musical key (optional)--seed: Random seed (0 = random)--device: Device (cpu, cuda, coreml)| Platform | Status | Build Instructions |
|---|---|---|
| Windows | ✅ | See BUILD.md |
| macOS | ✅ | See BUILD.md |
| Linux/Ubuntu | ✅ | See BUILD.md |
| Android | 🔄 | See mobile/android/README.md |
| iOS | 🔄 | See mobile/ios/README.md |
To verify Milestone 1 is working:
cmake --build .python scripts/convert_to_onnx.py./stable_audio_cli --model models/stable_audio.onnx --prompt "test"output.wav is created and plays correctlySee verification.md for detailed acceptance criteria
third_party/onnxruntime-{platform}/include/ and lib/ directories existhuggingface-cli logincmake --version (needs 3.18+)LICENSE.md for full detailsThis project uses C++ with ONNX Runtime instead of Python to achieve:
See CPP_MIGRATION_SUMMARY.md for details.
For issues or questions: