elgehelge/plapre-onnx-web
Plapre — ONNX weights for in-browser inference
Converted ONNX artifacts for running **Plapre**, an open-source Danish text-to-speech model, fully in the browser on `onnxruntime-web` (WebGPU, with a WASM fallback).
These files are consumed by the **plapre-in-a-browser** library and its live demo. They are a format conversion (PyTorch → ONNX) of the upstream model — no retraining — verified to reproduce the PyTorch reference to float precision.
Files
<variant> is pico or nano (see below); the Kanade files are shared.
Model variants
The repo hosts both Plapre sizes. The LM-side files above are variant-specific and live under each variant's directory: Pico (hidden 576) under pico/ and Nano (hidden 960) under nano/ (e.g. pico/lm/model.onnx, nano/lm/model.onnx). The Kanade kanade_decoder.*, hift_vocoder.*, and clone_encoder.onnx are shared across variants and stay at the root. Select a variant with loadPlapreEngine({ model: "pico" | "nano" }).
Usage
import { loadPlapreEngine } from "plapre-in-a-browser";
const engine = await loadPlapreEngine({
modelsBaseUrl: "https://huggingface.co/elgehelge/plapre-onnx-web/resolve/main",
});
const { samples, sampleRate } = await engine.synthesizeToPcm({
text: "Hej, hvordan har du det i dag?",
voice: "ida",
});License & attribution
Distributed under CC BY 4.0 (the most restrictive of the upstream licenses). Each artifact derives from a permissively licensed work:
These are format conversions (PyTorch → ONNX), not retraining. If you redistribute these artifacts, keep this attribution and the MIT/Apache notices. Full notices: https://github.com/elgehelge/plapre-in-a-browser/blob/main/NOTICE
