{"id":50309064,"url":"https://github.com/shreyaskarnik/svara-tts-webgpu","last_synced_at":"2026-05-28T19:04:00.792Z","repository":{"id":354079156,"uuid":"1221972154","full_name":"shreyaskarnik/svara-tts-webgpu","owner":"shreyaskarnik","description":"Browser-native multilingual Indic TTS via WebGPU + transformers.js v4 (Svara + SNAC)","archived":false,"fork":false,"pushed_at":"2026-05-06T05:51:57.000Z","size":701,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-06T07:30:45.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shreyaskarnik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-26T23:02:32.000Z","updated_at":"2026-05-06T05:52:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shreyaskarnik/svara-tts-webgpu","commit_stats":null,"previous_names":["shreyaskarnik/svara-tts-webgpu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shreyaskarnik/svara-tts-webgpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fsvara-tts-webgpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fsvara-tts-webgpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fsvara-tts-webgpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fsvara-tts-webgpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shreyaskarnik","download_url":"https://codeload.github.com/shreyaskarnik/svara-tts-webgpu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fsvara-tts-webgpu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33622070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-28T19:03:55.326Z","updated_at":"2026-05-28T19:04:00.784Z","avatar_url":"https://github.com/shreyaskarnik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: Svāra TTS WebGPU\nemoji: 🗣️\ncolorFrom: yellow\ncolorTo: red\nsdk: static\npinned: false\nlicense: apache-2.0\nshort_description: Multilingual Indic TTS in your browser, via WebGPU\nmodels:\n  - shreyask/svara-tts-v1-ONNX\n  - onnx-community/snac_24khz-ONNX\ntags:\n  - text-to-speech\n  - indic\n  - webgpu\n  - on-device\n---\n\n# Svāra TTS · WebGPU\n\nBrowser-native multilingual TTS for **19 Indian languages** powered by [Svara](https://huggingface.co/kenpath/svara-tts-v1), [SNAC](https://huggingface.co/hubertsiuzdak/snac_24khz), and [Transformers.js v4](https://huggingface.co/docs/transformers.js). Runs 100% locally in the browser after the one-time model download.\n\nThis build adds an explicit model load step, browser-side caching, multilingual voice switching, prompt presets, and a WebGPU worker tuned around the ONNX-exported Svāra model.\n\n## Architecture\n\n```\ntext → tokenizer → Llama-3.2-3B (q4f16, transformers.js v4 + WebGPU) →\n  audio token IDs in [128266, 156938) →\n  group every 7 → SNAC frame (3 hierarchical levels) →\n  SNAC decoder ONNX (q4f16/fp16 from onnx-community/snac_24khz-ONNX) →\n  24 kHz mono PCM → WAV blob → \u003caudio\u003e\n```\n\n## Models\n\n| Repo | Size | Notes |\n|------|------|-------|\n| [`shreyask/svara-tts-v1-ONNX`](https://huggingface.co/shreyask/svara-tts-v1-ONNX) | ~1.95 GB | Llama-3.2-3B q4f16, GQA, KV-cache |\n| [`onnx-community/snac_24khz-ONNX`](https://huggingface.co/onnx-community/snac_24khz-ONNX) | ~26 MB (fp16) | SNAC decoder |\n\n## Run locally\n\n```sh\nnpm install\nnpm run dev   # http://localhost:5173\n```\n\nFirst run downloads the selected model into the browser cache (LM + codec + tokenizer). Subsequent runs reuse the cached weights.\n\n## Voices\n\nUse a string of the form `\"\u003cLanguage Name\u003e (\u003cGender\u003e)\"`. **38 voices across 19 languages**: Hindi, Bengali, Marathi, Telugu, Kannada, Tamil, Malayalam, Gujarati, Punjabi, Assamese, Bhojpuri, Magahi, Maithili, Chhattisgarhi, Bodo, Dogri, Nepali, Sanskrit, English (Indian) — male + female each.\n\n## Notes\n\n- `q4f16` is the fastest cold-start option and works well for short prompts.\n- `q8` is heavier but can sound cleaner on more difficult prompts.\n- Emotion tags such as `\u003chappy\u003e` and `\u003csad\u003e` can be appended at the end of a line.\n- Everything stays local to the browser after the model has loaded.\n\n## Credits\n\n- [Kenpath](https://huggingface.co/kenpath) — Svara TTS v1 base model.\n- [Canopy Labs](https://huggingface.co/canopylabs) — Orpheus 3B Hindi base.\n- [Hugging Face](https://github.com/huggingface/transformers.js-examples/tree/main/text-to-speech-webgpu) — original `text-to-speech-webgpu` scaffold this project forked from.\n- License: Apache 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyaskarnik%2Fsvara-tts-webgpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshreyaskarnik%2Fsvara-tts-webgpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyaskarnik%2Fsvara-tts-webgpu/lists"}