v5.1: times read the way people say them (o 14:30 -> o štrnásť tridsať; whole hours o pätnástej; medzi 10:00 a 11:00 -> medzi desiatou a jedenástou)
Browse filesFiles changed (5)
32 unmodified lines333435363738399 unmodified lines4950515253545516 unmodified lines727374757677781 unmodified line8081828384858651 unmodified lines13813914014114214314465 unmodified lines21021121221321421521625 unmodified lines24224324424524624724832 unmodified linesleaving the device.** Natural Slovak with a full Slovak text frontend, and English with two steady voices.- **Slovak done properly:** numbers, dates, times, money and percentages are read with the right case endings("Dňa 3. mája o 14:30 prišlo 250 ľudí"). Abbreviations, voicing assimilation across words, stress, questions andpauses are handled, and ~360 foreign names are read the way Slovaks say them (Biden, Washingtone, Musk).About **1.3 % character error rate** on unseen sentences.- **English:** two voices (studio audiobook woman, conversational man), a fast CPU mode about 9x faster than real9 unmodified lines## ListenSlovak, voice `sk_a` (Regulus v5.0, the default settings below):| Text | Audio ||---|---|16 unmodified lines| You need | Use | Voices | Package ||---|---|---|---|| **Slovak** | **`v5.0`** (this page, `main`) | `sk_a`: man, natural reading voice | `tts_slovak` (onnxruntime) || **English** | **`v2.1`** | `en_hifi_92_clean` (woman, studio), `en_dt_0` (man, conversational) | `tts_english` (PyTorch) || English and Slovak in one app | both tags side by side | as above | both packages, ~0.5 GB of files together |1 unmodified line```shpip install numpy onnxruntime soundfile huggingface_hubhf download mmmhusto/Regulus --revision v5.0 --local-dir Reguluscd Reguluspython -m tts_slovak "Dňa 3. mája o 14:30 prišlo 250 ľudí. Prečo práve tam?" vystup.wav```51 unmodified lines## Quality and speed**Slovak, v5.0:** 105 sentences the model never trained on, read by `tts_slovak` (10 decoder steps). 64 of them aredense in ť ď ň ľ and in words read hard (ten, jeden, mladé, systém); 41 are FLEURS and TrePal test sentences.Scored with the Slovak Whisper `kinit/whisper-large-v3-turbo-sk` (character error rate), Whisper languageidentification and TorchAudio SQUIM (PESQ estimate, 1-4.5):65 unmodified lines- Slovak yes/no questions end with a falling melody, as in most of the training speech (Slovak speakers often rise).- 24 kHz audio. Foreign names outside the list are read with Slovak rules.- Very long sentences without punctuation are read in one piece.- One Slovak voice in v5.0; English and Slovak are separate releases (`v2.1`, `v5.0`).## License25 unmodified lines| **v2.1** | **English: v2.0 with a fast mode (2-step decoder + Vocos, ~9x real time on a laptop CPU), voice cloning and a measured recipe for adding a voice (5 min of speech)** | `hf download mmmhusto/Regulus --revision v2.1` || v3.0 | First bilingual try: v2.0 plus experimental Slovak (5 voices) | `hf download mmmhusto/Regulus --revision v3.0` || v4.0 | Slovak: three original synthetic voices (sk_f3, sk_f2, sk_m1), about 1 % character error rate | `hf download mmmhusto/Regulus --revision v4.0` || **v5.0** | **Slovak: voice `sk_a`, a real speaker's natural reading voice; foreign names read the way Slovaks say them, ten / jeden / mladé read hard, clearer ť ď ň** | `hf download mmmhusto/Regulus --revision v5.0` |The repository was called TTS-husto (and TTS-English) before; the old names redirect here.32 unmodified lines333435363738399 unmodified lines4950515253545516 unmodified lines727374757677781 unmodified line8081828384858651 unmodified lines13813914014114214314465 unmodified lines21021121221321421521625 unmodified lines24224324424524624724824932 unmodified linesleaving the device.** Natural Slovak with a full Slovak text frontend, and English with two steady voices.- **Slovak done properly:** numbers, dates, times, money and percentages are read with the right case endings("Dňa 3. mája o 14:30 prišlo 250 ľudí": o štrnásť tridsať, dvestopäťdesiat). Abbreviations, voicing assimilation across words, stress, questions andpauses are handled, and ~360 foreign names are read the way Slovaks say them (Biden, Washingtone, Musk).About **1.3 % character error rate** on unseen sentences.- **English:** two voices (studio audiobook woman, conversational man), a fast CPU mode about 9x faster than real9 unmodified lines## ListenSlovak, voice `sk_a` (Regulus v5.1, the default settings below):| Text | Audio ||---|---|16 unmodified lines| You need | Use | Voices | Package ||---|---|---|---|| **Slovak** | **`v5.1`** (this page, `main`) | `sk_a`: man, natural reading voice | `tts_slovak` (onnxruntime) || **English** | **`v2.1`** | `en_hifi_92_clean` (woman, studio), `en_dt_0` (man, conversational) | `tts_english` (PyTorch) || English and Slovak in one app | both tags side by side | as above | both packages, ~0.5 GB of files together |1 unmodified line```shpip install numpy onnxruntime soundfile huggingface_hubhf download mmmhusto/Regulus --revision v5.1 --local-dir Reguluscd Reguluspython -m tts_slovak "Dňa 3. mája o 14:30 prišlo 250 ľudí. Prečo práve tam?" vystup.wav```51 unmodified lines## Quality and speed**Slovak, v5.0 / v5.1:** 105 sentences the model never trained on, read by `tts_slovak` (10 decoder steps). 64 of them aredense in ť ď ň ľ and in words read hard (ten, jeden, mladé, systém); 41 are FLEURS and TrePal test sentences.Scored with the Slovak Whisper `kinit/whisper-large-v3-turbo-sk` (character error rate), Whisper languageidentification and TorchAudio SQUIM (PESQ estimate, 1-4.5):65 unmodified lines- Slovak yes/no questions end with a falling melody, as in most of the training speech (Slovak speakers often rise).- 24 kHz audio. Foreign names outside the list are read with Slovak rules.- Very long sentences without punctuation are read in one piece.- One Slovak voice; English and Slovak are separate releases (`v2.1`, `v5.1`).## License25 unmodified lines| **v2.1** | **English: v2.0 with a fast mode (2-step decoder + Vocos, ~9x real time on a laptop CPU), voice cloning and a measured recipe for adding a voice (5 min of speech)** | `hf download mmmhusto/Regulus --revision v2.1` || v3.0 | First bilingual try: v2.0 plus experimental Slovak (5 voices) | `hf download mmmhusto/Regulus --revision v3.0` || v4.0 | Slovak: three original synthetic voices (sk_f3, sk_f2, sk_m1), about 1 % character error rate | `hf download mmmhusto/Regulus --revision v4.0` || v5.0 | Slovak: voice `sk_a`, a real speaker's natural reading voice; foreign names read the way Slovaks say them, ten / jeden / mladé read hard, clearer ť ď ň| `hf download mmmhusto/Regulus --revision v5.0` || **v5.1** | **v5.0 with times read the way people say them: o 14:30 -> o štrnásť tridsať (a whole hour stays o pätnástej), medzi 10:00 a 11:00 -> medzi desiatou a jedenástou** | `hf download mmmhusto/Regulus --revision v5.1` |The repository was called TTS-husto (and TTS-English) before; the old names redirect here.
123version https://git-lfs.github.com/spec/v1oid sha256:7823dda05e582bd543425f60cd91172c6e107e6ce48fc166b05775223c5dbb10size 430124123version https://git-lfs.github.com/spec/v1oid sha256:48a5300b323a3f1c43d0dc4a56e96e96e38804650e467ff9f712b9063c7f59a5size 415724
123417 unmodified lines22232425262728139 unmodified lines168169170171172173174"""Slovak text-to-speech by husto (Regulus v5.0): the Slovak voice sk_a, 24 kHz.from tts_slovak import SlovakTTStts = SlovakTTS.from_pretrained("path/to/Regulus") # or SlovakTTS.from_pretrained() to download it17 unmodified linesimport numpy as np__all__ = ["SAMPLE_RATE", "SlovakTTS"]__version__ = "5.0"SAMPLE_RATE, HOP, N_MELS = 24000, 256, 100MEL_FLOOR = float(np.log(1e-5))139 unmodified linesreturn self.model(self.voices[0]).meta@classmethoddef from_pretrained(cls, path: str | Path | None = None, revision: str = "v5.0", **kw) -> SlovakTTS:if path is None or not Path(path).is_dir():from huggingface_hub import snapshot_download123417 unmodified lines22232425262728139 unmodified lines168169170171172173174"""Slovak text-to-speech by husto (Regulus v5.1): the Slovak voice sk_a, 24 kHz.from tts_slovak import SlovakTTStts = SlovakTTS.from_pretrained("path/to/Regulus") # or SlovakTTS.from_pretrained() to download it17 unmodified linesimport numpy as np__all__ = ["SAMPLE_RATE", "SlovakTTS"]__version__ = "5.1"SAMPLE_RATE, HOP, N_MELS = 24000, 256, 100MEL_FLOOR = float(np.log(1e-5))139 unmodified linesreturn self.model(self.voices[0]).meta@classmethoddef from_pretrained(cls, path: str | Path | None = None, revision: str = "v5.1", **kw) -> SlovakTTS:if path is None or not Path(path).is_dir():from huggingface_hub import snapshot_download
5 unmodified lines67891011121314151617185 unmodified linesdef main() -> None:ap = argparse.ArgumentParser(description="Slovak text-to-speech (Regulus v5.0)")ap.add_argument("text")ap.add_argument("out", help="output .wav (24 kHz)")ap.add_argument("--voice", default=None, help="sk_a (the only voice of v5.0)")ap.add_argument("--seed", type=int, default=0)ap.add_argument("--steps", type=int, default=None, help="decoder steps (default from voices.json)")ap.add_argument("--model", default=None, help="folder of the downloaded repository (default: download v5.0)")a = ap.parse_args()tts = SlovakTTS.from_pretrained(a.model)t0 = time.perf_counter()5 unmodified lines67891011121314151617185 unmodified linesdef main() -> None:ap = argparse.ArgumentParser(description="Slovak text-to-speech (Regulus v5.1)")ap.add_argument("text")ap.add_argument("out", help="output .wav (24 kHz)")ap.add_argument("--voice", default=None, help="sk_a (the only voice of v5.1)")ap.add_argument("--seed", type=int, default=0)ap.add_argument("--steps", type=int, default=None, help="decoder steps (default from voices.json)")ap.add_argument("--model", default=None, help="folder of the downloaded repository (default: download v5.1)")a = ap.parse_args()tts = SlovakTTS.from_pretrained(a.model)t0 = time.perf_counter()
279 unmodified lines280281282283284285286287288289290291292293294295296297298299300279 unmodified linesdef _h_time(self, m: re.Match, text: str) -> str:h, mi = int(m.group("th")), int(m.group("tm"))prev = prev_word(text, m.start())has_prep = prev in {"o", "od", "do", "okolo", "po", "pred", "pri", "k", "ku", "za", "v", "vo", "na"}parts: list[str] = []if has_prep:case = infer_case(prev, "", "ordinal")if prev in ("o", "v", "vo", "po", "pri"):case = "loc"elif prev in ("pred", "za"):case = "ins" if prev == "pred" else "acc"elif prev in ("k", "ku"):case = "dat"parts.append(N.ordinal(h, case, "f") if h else "polnoci" if case == "loc" else "nula")if mi:parts.append(self._minutes(mi))else:parts.append(N.cardinal(h))parts.append(self._minutes(mi) if mi else "nula nula")if m.group("tsec"):parts.append(N.cardinal(int(m.group("tsec"))))279 unmodified lines280281282283284285286287288289290291292293294295296297298299300301302303304305306279 unmodified linesdef _h_time(self, m: re.Match, text: str) -> str:h, mi = int(m.group("th")), int(m.group("tm"))prev = prev_word(text, m.start())if prev == "a" and re.search(r"\bmedzi\s+\d{1,2}:\d{2}\s+a\s*$", text[:m.start()], re.I):prev = "medzi" # "medzi 10:00 a 11:00": both times after medzihas_prep = prev in {"o", "od", "do", "okolo", "po", "pred", "pri", "k", "ku", "za", "v", "vo", "na", "medzi"}parts: list[str] = []if has_prep and mi and not m.group("tsec"):# "o 14:30" -> o štrnásť tridsať, "o 1:15" -> o jedna pätnásť: with minutes the hour is a plain number (as# people and announcements say it); a whole hour keeps the ordinal: o štrnástej, do ôsmej, medzi desiatouparts += [N.cardinal(h, "nom", "f"), self._minutes(mi)]elif has_prep:case = infer_case(prev, "", "ordinal")if prev in ("o", "v", "vo", "po", "pri"):case = "loc"elif prev in ("pred", "za", "medzi"):case = "acc" if prev == "za" else "ins"elif prev in ("k", "ku"):case = "dat"parts.append(N.ordinal(h, case, "f") if h else "polnoci" if case == "loc" else "nula")if mi:parts.append(self._minutes(mi))else:parts.append(N.cardinal(h, "nom", "f"))parts.append(self._minutes(mi) if mi else "nula nula")if m.group("tsec"):parts.append(N.cardinal(int(m.group("tsec"))))
README.md+8-7
samples/sk_a_spravy.wav+2-2
tts_slovak/__init__.py+3-3
tts_slovak/__main__.py+3-3
tts_slovak/frontend/normalize.py+11-5