piper-vercel
Piper TTS inference on Vercel (Fluid function, Node runtime) — no VPS needed.
- Pipeline:
piper-phonemizeWASM (espeak) ->onnxruntime-webWASM -> WAV - Voices resolved dynamically from
data/models_mapping.csv, models downloaded from Hugging Face on demand (LRU cache, 2 voices) - Endpoints:
GET /api/models,GET /api/speakers?repo=&json=,POST /api/synthesize
Setup
npm i
npx vercel link
npx vercel deploy --prod
The models/*.onnx, public/wasm/*.wasm and public/espeak-ng-data/ assets are
gitignored (large binaries) but included in the function bundle via includeFiles.