|
1 | 1 | # Track Extract |
2 | 2 |
|
3 | | -Track Extract is a local-first desktop prototype for AI stem separation. It is aimed at producers, engineers, DJs, remixers, and creators who need a cleaner workflow than dependency-heavy command-line wrappers: import audio, choose a curated separation task, run an offline job, preview stems, and export DAW-ready files. |
| 3 | +<p align="center"> |
| 4 | + <img src="src-tauri/icons/icon.png" width="96" alt="Track Extract app icon" /> |
| 5 | +</p> |
4 | 6 |
|
5 | | -This repository currently implements a Tauri + React desktop shell backed by a Python-first Track Extract engine. Rust is now a thin Tauri bridge for app paths, process spawning, cancellation, local media preview, and event forwarding. Python owns projects, sessions, jobs, model registry state, model installs, catalog sync, and separation providers. |
| 7 | +<p align="center"> |
| 8 | + <strong>Local-first desktop stem separation for producers, engineers, DJs, remixers, and creators.</strong> |
| 9 | +</p> |
6 | 10 |
|
7 | | -## Current Prototype Scope |
| 11 | +<p align="center"> |
| 12 | + <a href="https://github.com/AdamWentworth/TrackExtract/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/AdamWentworth/TrackExtract/actions/workflows/ci.yml/badge.svg" /></a> |
| 13 | + <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-2ec4d6" /></a> |
| 14 | + <img alt="Status: Prototype" src="https://img.shields.io/badge/status-prototype-f7c948" /> |
| 15 | + <img alt="Tauri 2" src="https://img.shields.io/badge/Tauri-2-24c8db" /> |
| 16 | + <img alt="Python Engine" src="https://img.shields.io/badge/engine-Python-73d18b" /> |
| 17 | +</p> |
8 | 18 |
|
9 | | -- Tauri 2 desktop shell with React and TypeScript. |
10 | | -- Thin Rust/Tauri bridge with Python-owned app state. |
| 19 | +Track Extract is a desktop-first app for local AI stem separation. The goal is a cleaner workflow than |
| 20 | +dependency-heavy command-line wrappers: import audio, choose a curated workflow, run an offline render, preview the |
| 21 | +generated stems, and export DAW-ready files with predictable names and folders. |
| 22 | + |
| 23 | +The current prototype uses a Tauri + React desktop shell with a Python-owned ML engine. Rust stays intentionally thin: |
| 24 | +it handles desktop plumbing, command/event forwarding, local media serving, path resolution, and process cancellation. |
| 25 | +Python owns projects, sessions, jobs, model registry state, installs, catalog sync, and separation providers. |
| 26 | + |
| 27 | +<p align="center"> |
| 28 | + <img src="docs/assets/workflow.svg" alt="Track Extract producer workflow" /> |
| 29 | +</p> |
| 30 | + |
| 31 | +## Current Status |
| 32 | + |
| 33 | +Track Extract is usable as a development prototype, not a polished end-user release. |
| 34 | + |
| 35 | +What works today: |
| 36 | + |
| 37 | +- Desktop app shell with React, TypeScript, Tauri 2, and a thin Rust bridge. |
| 38 | +- Browser-based development view on the same local engine state as the desktop window. |
11 | 39 | - Drag/drop and file-picker audio import. |
12 | 40 | - Project/session folder creation under `TrackExtract Projects`. |
13 | | -- JSON model registry copied into app data on first launch. |
14 | 41 | - Job queue with queued, preparing, running, complete, failed, and cancelled states. |
15 | | -- Python engine providers for Demucs, audio-separator, and stub/test renders. |
16 | | -- audio-separator catalog sync for discovering supported local model filenames. |
17 | | -- Expanded model registry with Demucs runtime presets, downloadable public UVR model files, MVSEP catalog references, source links, license notes, and not-yet-supported backend candidates. |
18 | | -- Managed model installer for downloadable catalog entries, with app-data storage and progress events. |
19 | | -- Stem preview and export flows wired through stable Tauri commands. |
| 42 | +- Python providers for Demucs, audio-separator, and stub/test renders. |
| 43 | +- Model registry with Demucs presets, downloadable public UVR entries, MVSEP references, source links, and license notes. |
| 44 | +- audio-separator catalog sync for discovering local model filenames. |
| 45 | +- Stem preview and export flows through stable Tauri commands. |
| 46 | +- Multi-step workflow plumbing for curated vocal cleanup chains. |
20 | 47 |
|
21 | | -The MVP does not include real-time separation, a DAW plugin, cloud processing, account logic, payments, or a production model downloader. |
| 48 | +Not included yet: |
| 49 | + |
| 50 | +- No DAW plugin. |
| 51 | +- No real-time separation. |
| 52 | +- No cloud processing, account system, payments, or subscription logic. |
| 53 | +- No fully packaged Python runtime for non-developer installs yet. |
22 | 54 |
|
23 | 55 | ## Architecture |
24 | 56 |
|
25 | | -The canonical engine source lives in `engine/src`, packaged as `trackextract_engine`. It exposes `python -m trackextract_engine` for the Rust bridge and future CLI/service work. Rust is limited to the Tauri shell and local desktop plumbing. |
| 57 | +<p align="center"> |
| 58 | + <img src="docs/assets/architecture.svg" alt="Track Extract runtime architecture" /> |
| 59 | +</p> |
26 | 60 |
|
27 | | -See [docs/architecture.md](docs/architecture.md) for the command/event flow and backend boundaries. |
| 61 | +The canonical engine source lives in `engine/src`, packaged as `trackextract_engine`. It exposes |
| 62 | +`python -m trackextract_engine` for the Rust bridge and future CLI/service work. |
28 | 63 |
|
29 | | -## Repository Layout |
| 64 | +| Layer | Role | |
| 65 | +| ------------ | ------------------------------------------------------------------------------------- | |
| 66 | +| `src/` | React + TypeScript UI for workspace, models, workflows, jobs, preview, and export. | |
| 67 | +| `src-tauri/` | Tauri desktop shell, Rust command bridge, event forwarding, cancellation, media URLs. | |
| 68 | +| `engine/` | Python ML/workflow engine for projects, sessions, jobs, providers, installs. | |
| 69 | +| `resources/` | Bundled model and workflow registries copied into app data. | |
| 70 | +| `schemas/` | JSON schemas for model, workflow, and session formats. | |
| 71 | +| `scripts/` | Setup, validation, formatting, linting, testing, and registry-generation helpers. | |
| 72 | +| `docs/` | Architecture, development, packaging, and model-registry notes. | |
30 | 73 |
|
31 | | -- `src/`: React/TypeScript frontend. |
32 | | -- `src-tauri/`: Tauri 2 shell, command bridge, event forwarding, cancellation, and local media server. |
33 | | -- `engine/`: Python engine source, tests, and package metadata. This is the product engine. |
34 | | -- `resources/`: Bundled model and workflow registries copied into app data. |
35 | | -- `schemas/`: JSON schemas for documented registry/session formats. |
36 | | -- `scripts/`: Setup, validation, and test entrypoints. |
37 | | -- `docs/`: Architecture, development, model-registry, and packaging notes. |
| 74 | +See [docs/architecture.md](docs/architecture.md) for command/event flow and backend boundaries. |
38 | 75 |
|
39 | | -## Build |
| 76 | +## Quick Start |
40 | 77 |
|
41 | | -Install Rust stable and the Tauri prerequisites for your OS. On Ubuntu-like Linux systems, Tauri also needs WebKit/RSVG/AppIndicator development packages: |
| 78 | +Install JavaScript dependencies: |
42 | 79 |
|
43 | 80 | ```bash |
44 | | -sudo apt update |
45 | | -sudo apt install pkg-config libdbus-1-dev libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev |
| 81 | +npm install |
46 | 82 | ``` |
47 | 83 |
|
48 | | -Then install JavaScript dependencies and run the app: |
| 84 | +Create the managed Python engine environment: |
49 | 85 |
|
50 | 86 | ```bash |
51 | | -npm install |
52 | | -npm run tauri dev |
| 87 | +scripts/setup-trackextract-engine.sh |
53 | 88 | ``` |
54 | 89 |
|
55 | | -To enable the Python engine in development, create the managed environment: |
| 90 | +Run the desktop app: |
56 | 91 |
|
57 | 92 | ```bash |
58 | | -scripts/setup-trackextract-engine.sh |
| 93 | +npm run tauri dev |
59 | 94 | ``` |
60 | 95 |
|
61 | | -Track Extract auto-detects `.venv-trackextract-engine/bin/python` when launched from this repo. To force a specific Python environment, set `TRACKEXTRACT_ENGINE_PYTHON`. For NVIDIA CUDA support in audio-separator, install/update the environment with `TRACKEXTRACT_AUDIO_SEPARATOR_EXTRA=gpu`; for Windows DirectML, use `TRACKEXTRACT_AUDIO_SEPARATOR_EXTRA=dml`. |
| 96 | +Track Extract auto-detects `.venv-trackextract-engine/bin/python` when launched from this repo. To force a specific |
| 97 | +Python environment, set `TRACKEXTRACT_ENGINE_PYTHON`. |
62 | 98 |
|
63 | | -See [docs/development.md](docs/development.md) for toolchain pins, environment overrides, and local check commands. |
| 99 | +For NVIDIA CUDA support through audio-separator, build the engine environment with the GPU extra: |
| 100 | + |
| 101 | +```bash |
| 102 | +TRACKEXTRACT_AUDIO_SEPARATOR_EXTRA=gpu scripts/setup-trackextract-engine.sh |
| 103 | +``` |
64 | 104 |
|
65 | | -For browser-only UI iteration with mock project/job data: |
| 105 | +For Windows DirectML: |
66 | 106 |
|
67 | 107 | ```bash |
68 | | -npm run dev:browser |
| 108 | +TRACKEXTRACT_AUDIO_SEPARATOR_EXTRA=dml scripts/setup-trackextract-engine.sh |
69 | 109 | ``` |
70 | 110 |
|
71 | | -When the dev server is running on `http://localhost:1420`, both the Tauri desktop window and a normal browser tab use the same local Python engine bridge. Imports, current project/session state, jobs, generated stems, and model/workflow registry changes are shared between both views during development. |
| 111 | +## Linux Tauri Prerequisites |
72 | 112 |
|
73 | | -If you launch the dev terminal from the Snap build of VS Code and see a `libpthread` |
74 | | -symbol lookup error when Tauri starts, run the clean environment helper instead: |
| 113 | +On Ubuntu-like Linux systems, Tauri needs WebKit/RSVG/AppIndicator development packages: |
75 | 114 |
|
76 | 115 | ```bash |
77 | | -npm run tauri:dev:clean |
| 116 | +sudo apt update |
| 117 | +sudo apt install pkg-config libdbus-1-dev libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev |
78 | 118 | ``` |
79 | 119 |
|
80 | | -For the full local suite, use: |
| 120 | +If Tauri is launched from the Snap build of VS Code and hits a `libpthread` symbol lookup error, use: |
81 | 121 |
|
82 | 122 | ```bash |
83 | | -npm run check |
| 123 | +npm run tauri:dev:clean |
84 | 124 | ``` |
85 | 125 |
|
86 | | -Network checks for model download URLs are kept opt-in so local tests are not flaky: |
| 126 | +## Browser Development |
| 127 | + |
| 128 | +For browser UI iteration: |
87 | 129 |
|
88 | 130 | ```bash |
89 | | -TRACKEXTRACT_TEST_NETWORK=1 npm run test:all |
| 131 | +npm run dev:browser |
90 | 132 | ``` |
91 | 133 |
|
92 | | -## Model Registry |
| 134 | +When the Vite server is running on `http://localhost:1420`, both the Tauri desktop window and a normal browser tab use |
| 135 | +the same local Python engine bridge. Imports, current project/session state, jobs, generated stems, model installs, and |
| 136 | +workflow changes are shared during development. |
| 137 | + |
| 138 | +## Models And Workflows |
93 | 139 |
|
94 | | -The generated bundled registry lives at `resources/models.json`, and source fragments live under `resources/models/`. |
| 140 | +The generated bundled registry lives at `resources/models.json`. Source fragments live under `resources/models/`. |
95 | 141 |
|
96 | 142 | ```bash |
97 | 143 | npm run models:build |
98 | 144 | npm run test:models |
99 | 145 | ``` |
100 | 146 |
|
101 | | -See [docs/model-registry.md](docs/model-registry.md) for registry structure, model sources, and install-state semantics. |
| 147 | +Model entries can represent: |
| 148 | + |
| 149 | +- Installed local providers, such as Demucs runtime presets. |
| 150 | +- Direct-download public model files. |
| 151 | +- audio-separator installable filenames. |
| 152 | +- Source references for models that need licensing/artifact follow-up before Track Extract can install them directly. |
| 153 | + |
| 154 | +Workflow presets live in `resources/workflows.json`. The UI also supports custom named workflows. |
| 155 | + |
| 156 | +See [docs/model-registry.md](docs/model-registry.md) for registry structure, source notes, and install-state semantics. |
| 157 | + |
| 158 | +## Checks |
| 159 | + |
| 160 | +Run the full local suite: |
| 161 | + |
| 162 | +```bash |
| 163 | +npm run check |
| 164 | +``` |
| 165 | + |
| 166 | +This runs formatting checks, frontend linting, Python linting, Rust clippy, model/workflow validation, Python engine |
| 167 | +tests, frontend tests, production frontend build, and Rust tests. |
| 168 | + |
| 169 | +Network checks for model download URLs are opt-in so local tests are not flaky: |
| 170 | + |
| 171 | +```bash |
| 172 | +TRACKEXTRACT_TEST_NETWORK=1 npm run test:all |
| 173 | +``` |
102 | 174 |
|
103 | 175 | ## Roadmap |
104 | 176 |
|
105 | | -1. Bundle/package the Python engine cleanly for end users. |
| 177 | +1. Package the Python engine cleanly for end users. |
106 | 178 | 2. Expand audio-separator catalog sync into curated installable workflows. |
107 | 179 | 3. Improve multi-step vocal cleanup execution. |
108 | | -4. Add native ONNX Runtime only for models where it clearly improves packaging or acceleration. |
109 | | -5. Better batch processing, cancellation, and resumable jobs. |
110 | | -6. DAW export templates for Ableton, Logic, Pro Tools, Reaper, and FL Studio. |
111 | | -7. Future VST3/AU bridge plugin that talks to the same offline Track Extract engine. |
| 180 | +4. Add native ONNX Runtime only where it clearly improves packaging or acceleration. |
| 181 | +5. Improve batch processing, cancellation, and resumable jobs. |
| 182 | +6. Add DAW export templates for Ableton, Logic, Pro Tools, Reaper, and FL Studio. |
| 183 | +7. Explore a future VST3/AU bridge plugin that talks to the same offline Track Extract engine. |
| 184 | + |
| 185 | +## License |
| 186 | + |
| 187 | +Track Extract is released under the [MIT License](LICENSE). |
0 commit comments