Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speech Playground

Sandbox for speech experiments with a FastAPI backend and a Svelte frontend.

Quick start

Recommended prerequisites:

1) Run the backend (FastAPI)

cd backend
cp .env.example .env
uv run --all-extras fastapi dev main.py

# optional: skip --all-extras to use only some functionality

2) Run the aligner service (Optional)

The forced alignment tool requires a separate service. If you want it, run this in a separate process:

3) Run the frontend (SvelteKit)

cd frontend
cp .env.example .env
pnpm install
pnpm run dev

This will start the app on http://localhost:5173.

Lazy-loaded modules

This project uses lazy loading for various speech processing models and encoders. Dependencies are loaded on-demand when specific endpoints are first accessed, rather than at application startup. This improves startup time but means:

  • First requests to each endpoint may be slower as models are loaded into memory
  • Additional dependencies may be required depending on which features you use
  • Some imports will fail until you install the necessary optional dependencies for the encoder/tokenizer you want to use

Note on Kanade: the kanade extra should be enough here. We rely on PyTorch's SDPA path in the pinned torch line for the attention optimizations we want.

Deploying

(Instructions from Svelte -- have not tried this yet)

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

About

Sandbox for speech experiments

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages