How 0x0funky/audioghost-ai works
AudioGhost is a local-first, text-guided audio/video separation editor. Users upload media, request one or more sound tracks (optionally for selected time ranges), compare takes, adjust the mix, and export audio or video; batch runs reuse a project’s sounds and mix across files. The graph separates the editing UI, API/domain services, worker/inference, and persistent state. Relationships involving unsampled modules are included only where README or source-index references support them; a few UI-to-API and external-service links remain unverified.
Main entry points: tasks.py Job lifecycle · Workspace.tsx Workspace · main.py HTTP application · sessions.py Session endpoints
Components 25
Editing interface
- Workspace
frontend/src/components/Workspace.tsx - Timeline editor
frontend/src/components/Timeline.tsx - Separation controls
frontend/src/components/SeparatePanel.tsx - Batch workflow
frontend/src/components/BatchDialog.tsx - Export controls
frontend/src/components/ExportDialog.tsx - Waveform view
frontend/src/components/Waveform.tsx - API client
frontend/src/lib/api.ts
API and workflows
- HTTP application
backend/main.py - Session endpoints
backend/api/sessions.py - Single-run endpoints
backend/api/separate.py - Batch endpoints
backend/api/batches.py - Task results
backend/api/tasks.py - Model access
backend/api/auth.py
Separation runtime
- Job dispatch
backend/workers/dispatch.py - Job lifecycle
backend/workers/tasks.py - SAM-Audio inference
backend/workers/sam_lite.py - Media decoding/export
backend/workers/audio_io.py - Model weights
backend/workers/model_files.py - Celery worker app
backend/workers/celery_app.py
Projects and state
- Session projects
backend/sessions.py - Batch orchestration
backend/batches.py - Queue bookkeeping
backend/workers/queue_state.py - License acceptance
backend/model_license.py
Other components
- User
- Model repository
Connections 34
- User → Workspace: edits and exports
- Workspace → Timeline editor: renders
frontend/src/components/Workspace.tsx - Workspace → Separation controls: renders
frontend/src/components/Workspace.tsx - Workspace → Batch workflow: renders
frontend/src/components/Workspace.tsx - Workspace → Export controls: renders
frontend/src/components/Workspace.tsx - Timeline editor → Waveform view: renders
frontend/src/components/Timeline.tsx - Batch workflow → API client: submits batch
- Separation controls → API client: submits separation
- Export controls → API client: requests exports
- API client → HTTP application: calls API
- HTTP application → Session endpoints: registers routes
backend/main.py - HTTP application → Batch endpoints: registers routes
backend/main.py - HTTP application → Single-run endpoints: registers routes
backend/main.py - HTTP application → Task results: registers routes
backend/main.py - Session endpoints → Session projects: reads and updates
backend/api/sessions.py - Session endpoints → Job dispatch: dispatches jobs
backend/api/sessions.py - Session endpoints → Queue bookkeeping: checks queue
backend/api/sessions.py - Single-run endpoints → Job dispatch: submits jobs
backend/api/separate.py - Single-run endpoints → Queue bookkeeping: tracks jobs
backend/api/separate.py - Batch endpoints → Batch orchestration: delegates batch
backend/api/batches.py - Batch endpoints → Job dispatch: dispatches jobs
backend/api/batches.py - Batch endpoints → Session endpoints: reuses session flow
backend/api/batches.py - Task results → Queue bookkeeping: reads queue state
backend/api/tasks.py - Model access → License acceptance: checks acceptance
backend/api/auth.py - Model access → Model weights: checks weights
backend/api/auth.py - Job dispatch → Celery worker app: queues tasks
backend/workers/dispatch.py - Job lifecycle → Queue bookkeeping: updates job state
backend/workers/tasks.py - Job lifecycle → Session projects: updates projects
backend/workers/tasks.py - Job lifecycle → SAM-Audio inference: runs inference
backend/workers/tasks.py - Job lifecycle → Media decoding/export: decodes and writes
backend/workers/tasks.py - Job lifecycle → Model weights: loads model files
backend/workers/tasks.py - Job lifecycle → License acceptance: checks license
backend/workers/tasks.py - SAM-Audio inference → Model weights: loads weights
backend/workers/sam_lite.py - Model weights → Model repository: downloads weights