Speechcraft is a browser-first workstation for turning raw speech recordings into clean, reviewable, training-ready voice datasets.
The current app is no longer just the original clip-review scaffold. It now has a full staged workflow:
Ingest -> Overview -> Slicer -> QC -> Lab -> Export
Reference selection remains available as a separate workstation route.
Create a project, select one or more .wav files with the native browser file picker, stage the file list, and upload the recordings into the project.
Uploads are streamed to the backend and imported as raw SourceRecording rows. Raw imported files are treated as immutable source material.
Overview is the source/preparation page.
It shows recording count, total duration, sample rates, channel counts, raw-vs-derived state, and technical warnings. It also owns dataset preparation and source-level speech metadata:
- preparation by downsampling, mono/downmix, or channel selection
- project-level ASR over the active prepared output group
- project-level alignment after ASR completes
- batch job activity for prep, ASR, and alignment
Preparation creates derived recordings with lineage instead of mutating raw imports.
Slicer is run-centric.
It launches slicer runs over the active prepared output group and requires prepared recordings to have alignment artifacts before slicing. Every slicer execution creates a distinct run; prior runs are preserved. Runs can be deleted to reclaim generated slices, jobs, QC runs, and media.
QC is machine triage for one slicer run.
It creates persisted QC runs, stores one result per slice, stores raw metrics and reason codes, separates machine buckets from human review state, detects stale QC, and hands filter/sort/threshold context into Lab.
QC buckets:
- Auto-kept
- Needs review
- Auto-rejected
Lab is the human review and override surface.
It can consume QC-origin queue context, but human review state remains authoritative. Machine QC shapes the queue and displays metadata; it does not replace human decisions.
Export is present in navigation as the downstream handoff stage. The backend has export preview/run endpoints, but the current frontend page is still mostly a shell.
backend/: FastAPI API, SQLite persistence, media management, processing worker, slicing/QC/export logicfrontend/: Next.js UI — the setup wizard and the Lab workstation.docs/: product, workflow, and implementation notes
docs/speechcraft_overview.md: product overview and stage responsibilitiesdocs/dataset_overview.md: Ingest/Overview/preparation/ASR/alignment behaviordocs/slicer_working_in_depth.md: slicer architecture and run behaviordocs/qc_page.md: QC data model, scoring, UI, stale-state, and Lab handoffdocs/clip_lab.md: Lab review and human override behaviordocs/Prep_Slicer_QC_spec.md: current sprint contract for prep, slicer, QC, and Labdocs/Reference_Picker_Spec.md: reference picker/workstation design notesINSTALL.md: setup, runtime, and verification commands
The easiest repo-level workflow is:
make setup
make checkThen run the app in two terminals:
make dev-backendmake dev-frontendmake dev-backend starts both the FastAPI API and the processing worker. The worker is required for preparation, ASR, alignment, and slicer jobs.
If the local MFA conda env exists at ~/.conda/envs/speechcraft-mfa/bin/mfa,
the Makefile auto-exports it for dataset-worker alignment runs.
The combined backend/API dev output is also written to backend/logs/dev-backend.log.
By default the Makefile uses:
- frontend:
http://127.0.0.1:3002 - backend:
http://127.0.0.1:8010 - backend docs:
http://127.0.0.1:8010/docs
The frontend reaches the backend same-origin through the /sc-api rewrite (see frontend/next.config.ts); override the target with SPEECHCRAFT_BACKEND_URL.
The backend stores local runtime state here:
backend/data/project.dbbackend/data/media/backend/exports/
These are local workstation/runtime files, not source code.
The backend uses faster-whisper for real ASR by default.
Useful environment variables:
ASR_BACKEND=faster_whisperASR_DEVICE=cpuorASR_DEVICE=cudaASR_COMPUTE_TYPE=int8for CPU orfloat16for CUDAASR_MODEL_PATH=/path/to/local/model-or-model-namewhen using a local model
The UI model option turbo maps to large-v3-turbo.
The stub ASR backend is disabled unless SPEECHCRAFT_ALLOW_STUB_ASR=1 is set. That path is for tests only.
Use:
make checkUseful focused checks:
python3 -m compileall backend/app
cd backend && uv run python -m unittest discover -s tests -p 'test_*.py'
cd frontend && bun run buildImplemented:
- project creation and
.wavingest - streamed recording upload
- raw and derived
SourceRecordingmodel - preparation jobs with derived-output lineage
- project-level ASR and alignment jobs
- active prepared output group for downstream slicing
- slicer run creation, history, stale state, and deletion
- QC run persistence, per-slice results, reason codes, raw metrics, and stale detection
- QC page summary, thresholds, histogram, source-order timeline, preview table, and Lab handoff
- Lab QC-origin filtering/sorting plus live human review override
- export preview and export run backend endpoints
- reusable job activity panel
- backend API and repository test coverage for the main pipeline contracts
Still intentionally rough:
- QC scoring is heuristic, not a trained model
- ASR/alignment batch progress is functional but not a full production job dashboard
- Export UI is still a shell around backend export capabilities
- advanced audio-quality metrics such as SNR, LUFS, clipping percentage, VAD speech ratio, and diarization are not implemented yet
- Reference remains a separate workstation outside the main sprint path