{"id":50308943,"url":"https://github.com/shreyaskarnik/bol-tts-marathi","last_synced_at":"2026-05-28T19:03:20.835Z","repository":{"id":353679979,"uuid":"1220440279","full_name":"shreyaskarnik/bol-tts-marathi","owner":"shreyaskarnik","description":"Marathi (मराठी) fine-tune of Kokoro-82M. End-to-end training recipe built on semidark/kokoro-deutsch. Published model: shreyask/bol-tts-marathi on HuggingFace.","archived":false,"fork":false,"pushed_at":"2026-05-02T05:46:10.000Z","size":210,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T07:27:50.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","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":"LICENSE","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":"NOTICE","maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-24T22:47:34.000Z","updated_at":"2026-05-02T05:46:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shreyaskarnik/bol-tts-marathi","commit_stats":null,"previous_names":["shreyaskarnik/bol-tts-marathi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shreyaskarnik/bol-tts-marathi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fbol-tts-marathi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fbol-tts-marathi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fbol-tts-marathi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fbol-tts-marathi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shreyaskarnik","download_url":"https://codeload.github.com/shreyaskarnik/bol-tts-marathi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyaskarnik%2Fbol-tts-marathi/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:19.559Z","updated_at":"2026-05-28T19:03:20.827Z","avatar_url":"https://github.com/shreyaskarnik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bol-tts-marathi\n\nTraining recipe and inference scaffold for fine-tuning [Kokoro-82M](https://github.com/hexgrad/kokoro) on Marathi (मराठी), built on top of [semidark/kokoro-deutsch](https://github.com/semidark/kokoro-deutsch)'s German fine-tuning recipe.\n\n## What This Is\n\n- A reproducible end-to-end Marathi Kokoro fine-tune: dataset prep → Stage 1 → Stage 2 → voicepack extraction → Mac-side inference\n- Original scripts for Marathi dataset preparation from AI4Bharat [Rasa](https://huggingface.co/datasets/ai4bharat/Rasa) and [IndicVoices-R](https://huggingface.co/datasets/ai4bharat/indicvoices_r)\n- Marathi-specific Kokoro vocab addition: `ɭ` (U+026D, retroflex lateral for ळ) inserted at slot 144\n- Documentation of every gotcha we hit during training (`docs/TROUBLESHOOTING.md`)\n- Automation for handoff between Stage 1 and Stage 2 plus an auto-monitor that notifies on Stage 2 completion\n\n## What This Is Not\n\n- Not a runnable Kokoro replacement — use [hexgrad/kokoro](https://github.com/hexgrad/kokoro) for that\n- Not a bundled training dataset (Rasa and IndicVoices-R licenses apply; you fetch them yourself)\n- Not a training framework fork — we submodule semidark's kokoro + StyleTTS2 forks and apply a small Marathi overlay\n\n## Start Here\n\n| Goal | Doc |\n|---|---|\n| I want to train my own Marathi voice | `docs/TRAINING_GUIDE.md` |\n| I want to install and test locally | `docs/SETUP.md` + `docs/INFERENCE.md` |\n| I want to prep a Marathi dataset | `docs/DATA_PREPARATION.md` |\n| I want to extract voicepacks from a trained model | `docs/VOICEPACKS.md` |\n| Training broke and I need to know why | `docs/TROUBLESHOOTING.md` |\n| I want architecture / compatibility details | `docs/ARCHITECTURE.md` |\n\n## Status\n\nThe end-to-end pipeline is working:\n\n`Dataset preparation → Weight conversion → Stage 1 → Stage 2 → Voicepack extraction → KModel inference`\n\nReference run:\n- **24,676 train utterances / 1,134 val** (Rasa marathi_female + marathi_male + IV-R 329 speakers)\n- **Stage 1: 10 epochs, final val_loss ≈ 0.23**\n- **Stage 2: 10 epochs, bs=8, ~13 h on A100 SXM 80GB**\n- 4 named voicepacks: Asha (मf), Vivek (mम), Mukta (fमु, IV-R pick), Dnyanesh (mज्ञ, IV-R pick)\n\n## Quick Setup\n\n### Prerequisites\n\n```bash\n# macOS\nbrew install espeak-ng libsndfile\n\n# Ubuntu/Debian (training pods)\nsudo apt-get install espeak-ng libsndfile1\n```\n\n`espeak-ng` is the Marathi G2P backend (via `misaki`); `libsndfile` is required by `soundfile` for WAV I/O.\n\n### Clone and sync\n\n```bash\ngit clone --recurse-submodules https://github.com/\u003cyou\u003e/bol-tts-marathi\ncd bol-tts-marathi\nuv sync\n```\n\nThe `kokoro/` and `StyleTTS2/` submodules point at semidark's forks (which carry the Kokoro-82M compatibility patches).\n\n### One environment variable\n\nMost scripts respect `BOL_REPO` (path to this clone). Default is the repo root; export it if you run from a different cwd:\n\n```bash\nexport BOL_REPO=\"$(pwd)\"\n```\n\n## Repository Layout\n\n```text\nkokoro/          # submodule → semidark/kokoro (Kokoro inference package)\nStyleTTS2/       # submodule → semidark/StyleTTS2 (training code)\nconfigs/\n  config_marathi_ft.yml   # Stage 1 + Stage 2 training config\n  config_mr.json          # Kokoro inference config with ɭ → 144 patched into vocab\n  voice_speeds.json       # per-voice optimal playback speed\ntraining/\n  kokoro_symbols.py       # Marathi-forked symbol table (ɭ at slot 144); copy into StyleTTS2/ before training\n  kokoro_tb_utils_mr.py   # Marathi test sentences for TensorBoard inference previews\n  OOD_texts.txt           # Marathi out-of-domain text set used during Stage 2\nscripts/\n  data_prep/              # Rasa + IV-R prep, speaker ID fixup, duration filter, OOD generation, manifest merge\n  diagnostics/            # Symbol table / audio / IPA length sanity checks\n  launch_training.sh      # STAGE=setup|1|2|both — pod driver\n  convert_kokoro_weights.py, fix_config_and_relaunch.py\n  inference_mac_mr.py     # Mac CPU inference with monkey-patched Marathi lang_code\n  extract_voicepacks_mr.py, pick_ivr_voices.py\n  post_stage1_handoff.sh, stage2_auto_monitor.sh  # automation between stages and after Stage 2\ndocs/            # SETUP, TRAINING_GUIDE, DATA_PREPARATION, VOICEPACKS, INFERENCE, TROUBLESHOOTING, ARCHITECTURE\n```\n\n## Voices\n\nWe derive four named voicepacks from the fine-tuned model. Voice names were picked to be Marathi words with positive meanings:\n\n| ID | Display | Source | Meaning |\n|---|---|---|---|\n| `mf_asha` | Asha (आशा) | Rasa marathi_female | hope |\n| `mm_vivek` | Vivek (विवेक) | Rasa marathi_male | wisdom |\n| `mf_mukta` | Mukta (मुक्ता) | IV-R top female speaker | pearl |\n| `mm_dnyanesh` | Dnyanesh (ज्ञानेश) | IV-R top male speaker | knowledge |\n\nIV-R picks are not fixed — run `scripts/pick_ivr_voices.py` to rank IV-R speakers by utterance count, listen to samples, and choose.\n\n## Contributing\n\nContributions welcome, especially:\n\n- Reproducible runs on a different GPU (1×4090, 2×A100) — we trained on single A100 SXM 80GB\n- Other Indian languages (Hindi, Gujarati, Punjabi) — Hindi needs no new vocab slot; Marathi's only novel phoneme was `ɭ`\n- Minglish (Marathi + English code-switch) improvements — English phoneme slots are barely trained in the fine-tune; a second-pass adaptation is a promising direction\n\n## Attribution\n\nSee `NOTICE` for upstream attribution and license details. This project is deeply indebted to [semidark/kokoro-deutsch](https://github.com/semidark/kokoro-deutsch) for the reference Kokoro fine-tuning recipe and to [hexgrad](https://github.com/hexgrad) for Kokoro + misaki.\n\n## License\n\nApache License 2.0 — see `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyaskarnik%2Fbol-tts-marathi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshreyaskarnik%2Fbol-tts-marathi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyaskarnik%2Fbol-tts-marathi/lists"}