Simple Python examples for the AudioShake stem separation API. Upload any song and get back isolated vocals, drums, bass, guitar, lyrics, and more.
Sign up at dashboard.audioshake.ai → Settings → API Keys → Create new key.
git clone https://github.com/audioshake/hackathon-examples.git
cd hackathon-examples
pip install -r requirements.txt
# Set your API key
cp .env.example .env
# Edit .env and paste your key# Try it with a demo track (no file needed)
python 01_vocals_and_instrumental.py https://demos.audioshake.ai/demo-assets/shakeitup.mp3
# Or use your own file
python 01_vocals_and_instrumental.py my_song.mp3| # | Script | What it does |
|---|---|---|
| 01 | 01_vocals_and_instrumental.py |
Split a song into vocals + instrumental. Great for karaoke or remixes. |
| 02 | 02_full_band_stems.py |
Get individual stems: vocals, drums, bass, and other instruments. |
| 03 | 03_lyrics_transcription.py |
Isolate vocals and transcribe lyrics with timestamps (TXT, JSON). |
All examples use the AudioShakeClient in audioshake_client.py, which wraps the Tasks API:
from audioshake_client import AudioShakeClient
client = AudioShakeClient(api_key="your_key")
task = client.process(
source_url="https://example.com/song.mp3",
targets=[
{"model": "vocals", "formats": ["wav"]},
{"model": "drums", "formats": ["wav"]},
],
output_dir="output",
)The workflow is: Upload → Create Task → Poll → Download. The process() method handles all of it.
| Model | Description |
|---|---|
vocals |
All vocals (lead + backing) |
vocals_lead |
Lead vocal only |
vocals_backing |
Backing vocals only |
instrumental |
Full mix minus vocals |
drums |
Drums and percussion |
bass |
Bass |
guitar |
All guitar |
guitar_electric |
Electric guitar |
guitar_acoustic |
Acoustic guitar |
piano |
Piano |
keys |
All keyboard instruments |
strings |
Strings |
wind |
Woodwinds and brass |
other |
Everything except vocals, drums, bass |
| Model | Description |
|---|---|
dialogue |
Isolate speech from background noise/music |
speech_clarity |
Clean up noisy speech recordings |
effects |
Sound effects with dialogue and music removed |
multi_voice |
Separate individual speakers |
| Model | Description |
|---|---|
transcription |
Lyrics/speech with word-level timestamps |
alignment |
Align timestamps to an existing transcript |
| Model | Description |
|---|---|
music_detection |
Detect where music appears (returns timestamps) |
music_removal |
Remove music, keep speech + effects |
- Stem Mixer Web App — Upload a song, separate stems, add per-stem volume controls
- AI Karaoke — Remove vocals, display synced lyrics from transcription
- Podcast Cleaner — Use
dialogueorspeech_clarityto clean up noisy recordings - Sample Finder — Isolate drums/bass/vocals from tracks to build a sample library
- Music Education Tool — Isolate individual instruments for practice or analysis
- Remix Machine — Separate stems, apply effects, recombine
Full docs: audioshake.mintlify.app/api-reference
| Endpoint | Method | Description |
|---|---|---|
/assets |
POST | Upload a file |
/tasks |
POST | Create a processing task (up to 20 targets) |
/tasks/{id} |
GET | Check task status and get results |
Output formats: wav, mp3, flac, aiff, mp4, json, srt, txt
Note: Output download links expire after 1 hour. Re-fetch the task to get fresh links.