--- title: Bol TTS Marathi emoji: ЁЯкФ colorFrom: yellow colorTo: red sdk: static pinned: false license: apache-2.0 models: - shreyask/bol-tts-marathi-onnx tags: - text-to-speech - marathi - kokoro - webgpu - on-device --- # bol-tts-marathi тАФ Marathi TTS via WebGPU In-browser Marathi (рдорд░рд╛рдареА) text-to-speech, running real-time on WebGPU. Six voices, code-switch (Minglish) support, no server round-trip. This Space ships **both the built demo** (`index.html` + `assets/` served directly) **and the full source** (`src/`, `package.json`, `tsconfig.json`, `vite.config.ts`) so anyone can fork the Space and rebuild without de-minifying the bundle. ## What's in this Space | Path | Role | |---|---| | `index.html`, `assets/*` | built demo, served via static SDK | | `voices/*.bin` | 6 voicepacks (style vectors, 522 KB each) | | `voicepacks.json` | source-of-truth for voice list + per-gender test phrases | | `src/` | TypeScript source (phonemizer, tokenizer, model wrapper, UI wiring) | | `public/` | static assets fed to the build | | `package.json`, `tsconfig.json`, `vite.config.ts` | reproducible build config | | `index.template.html` | the source-side index.html that Vite injects modules into | ## Reproduce locally ```bash git clone https://huggingface.co/spaces// cd npm install npm run dev # local dev server at http://localhost:5173 npm run build # produces dist/ тАФ same artifacts shipped here ``` ## How it works - 82M-parameter Kokoro fine-tune for Marathi (model: [`shreyask/bol-tts-marathi-onnx`](https://huggingface.co/shreyask/bol-tts-marathi-onnx)) - `@huggingface/transformers` loads the ONNX model into WebGPU (or falls back to WASM) - `espeak-ng-wasm` phonemizes Marathi + Indian English; we parse `(en)/(mr)` tags for per-segment Indian-accent rules on English chunks - 6 voices via single shared model + per-voice 256-D style vectors (`voices/*.bin`, [510, 1, 256] float32) - Test phrases + voice metadata in `voicepacks.json` тАФ edit to add voices, no code changes needed Recipe + training scripts: [github.com/shreyaskarnik/bol-tts-marathi](https://github.com/shreyaskarnik/bol-tts-marathi) ## Voices | ID | Name | Gender | Source | Status | |---|---|---|---|---| | `mf_asha` | Asha (рдЖрд╢рд╛) | female | Rasa Marathi | stable | | `mm_vivek` | Vivek (рд╡рд┐рд╡реЗрдХ) | male | Rasa Marathi | stable | | `mf_mukta` | Mukta (рдореБрдХреНрддрд╛) | female | IndicVoices-R | stable | | `mm_dnyanesh` | Dnyanesh (рдЬреНрдЮрд╛рдиреЗрд╢) | male | IndicVoices-R | stable | | `mf_priya` | Priya (рдкреНрд░рд┐рдпрд╛) | female | SPRINGLab IndicTTS | v0.2 preview | | `mm_arjun` | Arjun (рдЕрд░реНрдЬреБрди) | male | SPRINGLab IndicTTS | v0.2 preview | ## License Apache 2.0. See LICENSE.