Thanks for your interest in contributing to TTSLab! This guide will help you get started.
- Node.js 20+
- pnpm (install via
corepack enableornpm i -g pnpm) - A Neon Postgres database (or compatible PostgreSQL instance)
# Clone the repo
git clone https://github.com/MbBrainz/ttslab.git
cd ttslab
# Install dependencies
pnpm install
# Copy environment variables
cp .env.example .env.local
# Fill in your DATABASE_URL and other variables
# Push the database schema
pnpm db:push
# Seed the models table
pnpm db:seed
# Start the dev server (uses --webpack flag, required for ONNX alias)
pnpm dev- Formatter/Linter: Biome — run
pnpm checkto auto-fix - Indentation: Tabs
- Quotes: Double quotes
- Semicolons: Always
Run pnpm lint to check, pnpm format to auto-format.
- Create a loader in
src/lib/inference/loaders/— implement theModelLoaderinterface - Register it in
src/lib/inference/registry.tswith a lazy import - Add a seed entry in
scripts/seed-models.tswith the model metadata - Run
pnpm db:seedto insert the model into the database
See existing loaders (e.g., kokoro.ts, whisper.ts) for reference.
- Fork the repo and create a branch from
main - Make your changes — keep PRs focused on a single concern
- Run
pnpm checkto ensure linting/formatting passes - Run
pnpm buildto verify the build succeeds - Open a PR with a clear description of the change
- Use GitHub Issues
- Include browser, OS, and GPU info for WebGPU-related issues
- Include console errors and reproduction steps when possible
By contributing, you agree that your contributions will be licensed under the MIT License.