feat(diacritics): Russian/Ukrainian/Belarusian stress as add_diacritics backends#187
feat(diacritics): Russian/Ukrainian/Belarusian stress as add_diacritics backends#187JarbasAl wants to merge 1 commit into
Conversation
…d stress Routes lang_code starting with ru/uk/be to `stressonnx.stress` inside the existing `BasePhonemizer.add_diacritics` dispatch (same generic flag as Arabic tashkeel / Hebrew niqqud — no new SynthesisConfig field). Adds optional `SynthesisConfig.diacritics_model` to select the stressonnx model variant (e.g. "silero"/"ruaccent"); forwarded only when the backend's signature accepts it, so it is safely ignored on older installs. Auto-enables `VoiceConfig.add_diacritics` for ru/uk/be (mirrors existing ar behaviour) in both `__post_init__` and the Piper `from_dict` branch. The stressonnx backend is best-effort: an ImportError or runtime exception logs a warning and returns the original text unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Hello there! I've processed your latest changes. 🌊I've aggregated the results of the automated checks for this PR below. 🔍 LintThe data has been harvested! Check the findings below. 🌾 ❌ ruff: issues found — see job log 🔒 Security (pip-audit)Checking if we're following security best practices. 📏 ✅ No known vulnerabilities found (61 packages scanned). 📊 CoverageIs the code fully immunized with tests? 💉 ❌ 41.8% total coverage Files below 80% coverage (43 files)
Full report: download the 📋 Repo HealthEnsuring the repo's joints are well-oiled (aka CI/CD). ⚙️ Latest Version: ✅ ⚖️ License CheckEnsuring our project remains legally compliant. ✅ ❌ License violations detected (43 packages) — review required before merging. License distribution: 14× MIT License, 7× Apache Software License, 5× MIT, 3× Apache-2.0, 2× BSD-3-Clause, 2× ISC License (ISCL), 1× 3-Clause BSD License, 1× Apache Software License; BSD License, +8 more Full breakdown — 43 packages
Copyright (c) 2022 Phil Ewels Permission is hereby granted, free of charge, to any person obtaining a copy The above copyright notice and this permission notice shall be included in all THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔨 Build TestsEnsuring the gears are properly lubricated. 💧 ✅ All versions pass
From the digital workshop of OpenVoiceOS. 🛠️ |
Word stress is a pronunciation-disambiguating diacritic mark (same category as Arabic tashkeel / Hebrew niqqud), so it's a backend of the generic
add_diacritics, not a separate flag.BasePhonemizer.add_diacriticsnow routes langru/uk/beto a stress accentuator (stressonnx), best-effort (warn + identity if absent), alongside ar→tashkeel and he→niqqud.VoiceConfigauto-enablesadd_diacriticsfor those langs. AddsSynthesisConfig.diacritics_model(variant selector, e.g. silero vs ruaccent for ru), forwarded only when the backend's signature accepts it.No new flag. 16 new tests, 262 passed.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com