v5.0: Slovak voice sk_a (a Common Voice speaker, CC0, own model and vocoder); foreign names respelled, ten/jeden/mladé hard, short j after ť ď ň before e. sk_f3/sk_f2/sk_m1 stay in v4.0
Browse filesFiles changed (15)
- README.md+41-36
- config.json+205-198
- model.safetensors+2-2
- tts_slovak/__init__.py+100-45
- tts_slovak/__main__.py+4-4
- tts_slovak/frontend/data/foreign.tsvAdded+547
- tts_slovak/frontend/data/g2p_hard.txt+333
- tts_slovak/frontend/g2p.py+80-7
- tts_slovak/frontend/pipeline.py+3-2
- tts_slovak/model.py+27-5
- vocoder.safetensorsAdded+3
- web/bigvgan.onnx+1-1
- web/decoder.onnx+1-1
- web/text.onnx+1-1
- web/voices.json+1-1
21 unmodified lines2223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374753 unmodified lines79808182838485868788899091929394953 unmodified lines991001011021031041051061071081091101111121131141152 unmodified lines1181191201211221231241251 unmodified line12712812913013113221 unmodified lines| v2.0 | Fine-tune of v1.0 on two voices: Studio 92 (Cori Samuel) and DailyTalk man | `hf download mmmhusto/TTS-husto --revision v2.0` || v2.1 | 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/TTS-husto --revision v2.1` || v3.0 | First bilingual try: v2.0 plus experimental Slovak (5 voices) | `hf download mmmhusto/TTS-husto --revision v3.0` || **v4.0** | **Slovak: three original Slovak voices, about 1 % character error rate, runs on CPU and in the browser** | `hf download mmmhusto/TTS-husto --revision v4.0` |**This page describes v4.0, the Slovak model.** For English use **v2.1** (or v2.0); the[demo](https://huggingface.co/spaces/mmmhusto/TTS-English-demo) has both languages.## Slovak voices| Voice | Sound | Built from ||---|---|---|| `sk_f3` | woman, clean studio sound | 80 % the Lili recordings (CC0) + 20 % the FLEURS Slovak women (CC BY 4.0) || `sk_f2` | woman, clearest | Slovak pronunciation of three native TrePal speakers; sound from the English studio voices HiFi-TTS 92 and 8051 || `sk_m1` | man | Slovak pronunciation of native TrePal speakers; sound from English studio voices plus the Slovak mix |The voices are synthetic: vectors mixed in the model's voice space and then fine-tuned on their own ASR-checkedspeech. None is meant to imitate a person; please do not use them to impersonate anyone.## Quality281 Slovak sentences the model never trained on (150 FLEURS test, 131 TrePal test, 6-20 words each), scored withthe Slovak Whisper `kinit/whisper-large-v3-turbo-sk` (character error rate), Whisper language identification(probability of Slovak) and TorchAudio SQUIM (PESQ estimate):| Voice | CER, 32 steps | CER, 10 steps | P(Slovak) | PESQ, 32 / 10 steps ||---|---|---|---|---|| sk_f3 | 1.07 % | 1.03 % | 0.99 | 3.59 / 3.55 || sk_f2 | 1.12 % | 1.12 % | 0.99 | 3.72 / 3.68 || sk_m1 | 1.20 % | 1.18 % | 0.99 | 3.07 / 3.01 |10 decoder steps read as well as 32 and are 3x faster, so 10 is the default (`--steps 32` for the last bit of clarity;16 steps: the same CER, PESQ 3.57 / 3.70 / 3.06).SQUIM works at 16 kHz and does not hear noise above 8 kHz.## Use it```shpip install numpy onnxruntime soundfile huggingface_hubhf download mmmhusto/TTS-husto --revision v4.0 --local-dir TTS-hustocd TTS-hustopython -m tts_slovak "Dňa 3. mája o 14:30 prišlo 250 ľudí. Prečo práve tam?" vystup.wav --voice sk_f3``````pythonfrom tts_slovak import SlovakTTStts = SlovakTTS.from_pretrained(".") # the downloaded folderwav = tts("Dobrý deň, ako sa máte?", voice="sk_m1") # float32 numpy array, 24 kHztts.save("Vlak odchádza o 7:45 z druhej koľaje.", "vlak.wav", voice="sk_f2")for chunk in tts.stream("Prvá veta. Druhá veta.", voice="sk_f3"): # one chunk per sentence...```3 unmodified lines**Text frontend** (`tts_slovak/frontend`, pure Python): numbers, dates, times, money and percentages read out withSlovak declension, common abbreviations, grapheme-to-phoneme rules with voicing assimilation across words, stress,sentence types (statement, yes/no question, wh-question, exclamation) and pause levels.**Delivery**: the durations the model draws are shaped like people read Slovak, measured on FLEURS: short comma pauses(at most 0.19 s), the last vowel of a sentence at most 1.25x the sentence's median vowel, long vowels 1.12x and shortones 0.85x (the model's own contrast was weak), at least 64 ms per vowel and 32 ms per other sound (short words wereswallowed), a silent lead-in and a silent sentence end.### PyTorch`model.safetensors` + `config.json` hold the acoustic model (41.8 M parameters) for research or fine-tuning; the code is`tts_slovak/model.py`:```pythonimport json, torch3 unmodified linescfg = json.load(open("config.json"))model = SkttsV2(len(cfg["symbols"]), len(cfg["voices"]), cfg["mel_mean"], cfg["mel_std"], cfg=cfg["model"]).eval()model.load_state_dict(load_file("model.safetensors"))kw = natural_sk(cfg["symbols"], cfg["model"]) # pass eq_gain=None for sk_f3 (no s/c/z equaliser)# ids: tts_slovak.SlovakTTS.ids(tokens of the frontend); spks: index into cfg["voices"]```The vocoder is NVIDIA's `nvidia/bigvgan_base_24khz_100band` (MIT); `web/bigvgan.onnx` is its export.## Known limits- Yes/no questions end with a falling melody, as in most of the training speech (Slovak speakers often rise). Apost-processing lift was built and tried, and left out after listening.- 24 kHz audio. Foreign names and words are read with Slovak rules.- Very long sentences without punctuation are read in one piece.## How it was made2 unmodified linesSlovak with a shared symbol table (English ids first, then `sk:` phonemes): TrePal (166 speakers, at most 1.5 h each),Lili and FLEURS Slovak, with English replay so English is not forgotten. Each voice was then "locked": 1,800-2,500sentences synthesised in that voice, only takes that the Slovak Whisper transcribed without an error kept, and themodel fine-tuned on them. The last fine-tune (4,000 steps) added Lili's questions and exclamations. Trained on oneRTX 3080.## Data and attribution1 unmodified line(nrsr.sk, tv.nrsr.sk), segmentation and alignment by Streams s.r.o.- [Lili](https://huggingface.co/datasets/vsisik/voice-dataset-lili), Open Home Foundation, CC0.- [FLEURS](https://huggingface.co/datasets/google/fleurs) Slovak, Google, CC BY 4.0.- English base model data (HiFi-TTS, DailyTalk and others) and BigVGAN: see[v1.0](https://huggingface.co/mmmhusto/TTS-husto/tree/v1.0) and [v2.0](https://huggingface.co/mmmhusto/TTS-husto/tree/v2.0).- Model license: CC BY-SA 4.0 (inherited from DailyTalk in the English base).21 unmodified lines22232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273743 unmodified lines78798081828384858687888990919293949596973 unmodified lines1011021031041051061071081091101111121131141151161171182 unmodified lines1211221231241251261271281 unmodified line13013113213313413513613721 unmodified lines| v2.0 | Fine-tune of v1.0 on two voices: Studio 92 (Cori Samuel) and DailyTalk man | `hf download mmmhusto/TTS-husto --revision v2.0` || v2.1 | 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/TTS-husto --revision v2.1` || v3.0 | First bilingual try: v2.0 plus experimental Slovak (5 voices) | `hf download mmmhusto/TTS-husto --revision v3.0` || v4.0 | Slovak: three original Slovak voices, about 1 % character error rate, runs on CPU and in the browser | `hf download mmmhusto/TTS-husto --revision v4.0` || **v5.0** | **Slovak: one 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/TTS-husto --revision v5.0` |**This page describes v5.0, the Slovak model.** For English use **v2.1** (or v2.0); the three synthetic Slovak voices(sk_f3, sk_f2, sk_m1) stay in **v4.0**. The [demo](https://huggingface.co/spaces/mmmhusto/TTS-English-demo) has bothlanguages.## The voice| Voice | Sound | Built from ||---|---|---|| `sk_a` | man, natural reading voice | one anonymous Slovak Mozilla Common Voice contributor (3 h, CC0) |`sk_a` is the voice of a real, anonymous person who gave their recordings to Mozilla Common Voice under CC0. Please donot use it to impersonate anyone or to try to identify the speaker.## Quality105 Slovak sentences the model never trained on, read by this package (onnxruntime, 10 decoder steps): 64 dense inť ď ň ľ and in the hard exceptions (ten, jeden, mladé, systém) and 41 FLEURS / TrePal test sentences. Scored with theSlovak Whisper `kinit/whisper-large-v3-turbo-sk` (character error rate), Whisper language identification(probability of Slovak) and TorchAudio SQUIM (PESQ estimate):| Voice | CER | P(Slovak) | PESQ ||---|---|---|---|| sk_a | 1.30 % | 0.98 | 3.91 || (v4.0 sk_f3 / sk_f2 / sk_m1, same sentences and frontend) | 1.48 / 1.67 / 1.97 % | 0.99 / 0.99 / 0.98 | 3.71 / 3.78 / 3.26 |Most errors are Whisper writing numbers as digits ("desať" -> 10) and the Indian names of one sentence. The PESQestimate equals that of the speaker's own recordings (3.91). SQUIM works at 16 kHz and does not hear noise above 8 kHz.## Use it```shpip install numpy onnxruntime soundfile huggingface_hubhf download mmmhusto/TTS-husto --revision v5.0 --local-dir TTS-hustocd TTS-hustopython -m tts_slovak "Dňa 3. mája o 14:30 prišlo 250 ľudí. Prečo práve tam?" vystup.wav``````pythonfrom tts_slovak import SlovakTTStts = SlovakTTS.from_pretrained(".") # the downloaded folderwav = tts("Dobrý deň, ako sa máte?") # float32 numpy array, 24 kHz (voice "sk_a")tts.save("Vlak odchádza o 7:45 z druhej koľaje.", "vlak.wav")for chunk in tts.stream("Prvá veta. Druhá veta."): # one chunk per sentence...```3 unmodified lines**Text frontend** (`tts_slovak/frontend`, pure Python): numbers, dates, times, money and percentages read out withSlovak declension, common abbreviations, grapheme-to-phoneme rules with voicing assimilation across words, stress,sentence types (statement, yes/no question, wh-question, exclamation) and pause levels. New in v5.0: about 360foreign (mostly English) names, places, brands and words respelled as Slovaks say them, with Slovak case endings(Biden -> bajden, Washingtone -> vošingtone); d t n l hard in ten, tento, tie, jeden, vtedy, teda and theadjective endings -é, -ého, -ému, -ej (mladé, celej), and in ~330 loanword stems (systém, problém, partner).**Delivery**: `sk_a` keeps the timing its speaker has (the duration floors and vowel scaling v4.0 used for itssynthetic voices flattened a real voice's rhythm), with short comma pauses, a silent lead-in and a silent sentenceend. It also gets a short j after ť ď ň before e (ťeta -> ť j e t a, the j at 0.7 of its length): its speaker softensthem weakly, and the model learnt that; the setting is `soft_glide` in `web/voices.json`.### PyTorch`model.safetensors` + `config.json` hold the acoustic model (41.8 M parameters) for research or fine-tuning, and`vocoder.safetensors` the vocoder; the code is `tts_slovak/model.py`:```pythonimport json, torch3 unmodified linescfg = json.load(open("config.json"))model = SkttsV2(len(cfg["symbols"]), len(cfg["voices"]), cfg["mel_mean"], cfg["mel_std"], cfg=cfg["model"]).eval()model.load_state_dict(load_file("model.safetensors"))kw = {**natural_sk(cfg["symbols"], cfg["model"]), "eq_gain": None, **cfg["delivery"]} # the voice's own timing# ids: tts_slovak.SlovakTTS.ids(tokens of the frontend); spks: index into cfg["voices"]```The vocoder is NVIDIA's `nvidia/bigvgan_base_24khz_100band` (MIT) fine-tuned on this voice; `web/bigvgan.onnx` isits export.## Known limits- Yes/no questions end with a falling melody, as in most of the training speech (Slovak speakers often rise). Apost-processing lift was built and tried, and left out after listening.- 24 kHz audio. Foreign names outside the list are read with Slovak rules.- Very long sentences without punctuation are read in one piece.## How it was made2 unmodified linesSlovak with a shared symbol table (English ids first, then `sk:` phonemes): TrePal (166 speakers, at most 1.5 h each),Lili and FLEURS Slovak, with English replay so English is not forgotten. Each voice was then "locked": 1,800-2,500sentences synthesised in that voice, only takes that the Slovak Whisper transcribed without an error kept, and themodel fine-tuned on them (v4.0). `sk_a`: that model fine-tuned on its speaker's 3 hours of Common Voice recordings (best at 3,000 steps), with BigVGAN fine-tunedon the model's own mels of the voice (4,000 steps). Trained on one RTX 3080.## Data and attribution1 unmodified line(nrsr.sk, tv.nrsr.sk), segmentation and alignment by Streams s.r.o.- [Lili](https://huggingface.co/datasets/vsisik/voice-dataset-lili), Open Home Foundation, CC0.- [FLEURS](https://huggingface.co/datasets/google/fleurs) Slovak, Google, CC BY 4.0.- sk_a: [Mozilla Common Voice](https://commonvoice.mozilla.org) 22 Slovak (CC0), restored with Sidon([sarulab-speech/commonvoice22_sidon](https://huggingface.co/datasets/sarulab-speech/commonvoice22_sidon)).- English base model data (HiFi-TTS, DailyTalk and others) and BigVGAN: see[v1.0](https://huggingface.co/mmmhusto/TTS-husto/tree/v1.0) and [v2.0](https://huggingface.co/mmmhusto/TTS-husto/tree/v2.0).- Model license: CC BY-SA 4.0 (inherited from DailyTalk in the English base).
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199{"model": {"n_feats": 100,"spk_dim": 256,"enc_dim": 256,"enc_layers": 6,"enc_heads": 4,"dec_dim": 512,"dec_layers": 10,"dec_heads": 8,"dropout": 0.1,"dec_dropout": 0.0,"p_uncond": 0.1,"phone_pos": true,"dur_flow": true,"dur_dim": 192,"dur_layers": 3,"t_uniform": 0.2,"n_styles": 0,"ctx_dim": 0,"p_ctx_drop": 0.1},"symbols": ["<pad>","<bos>","<eos>","<unk>","▁",",",".","!","?","AA0","AA1","AA2","AE0","AE1","AE2","AH0","AH1","AH2","AO0","AO1","AO2","AW0","AW1","AW2","AY0","AY1","AY2","EH0","EH1","EH2","ER0","ER1","ER2","EY0","EY1","EY2","IH0","IH1","IH2","IY0","IY1","IY2","OW0","OW1","OW2","OY0","OY1","OY2","UH0","UH1","UH2","UW0","UW1","UW2","B","CH","D","DH","F","G","HH","JH","K","L","M","N","NG","P","R","S","SH","T","TH","V","W","Y","Z","ZH","sk:<s>","sk:<q>","sk:<wh>","sk:<e>","sk:|1","sk:|2","sk:|3","sk:|4","sk:▁","sk:ˈ","sk:a","sk:e","sk:i","sk:o","sk:u","sk:aː","sk:eː","sk:iː","sk:oː","sk:uː","sk:ia","sk:ie","sk:iu","sk:uo","sk:r̩","sk:r̩ː","sk:l̩","sk:l̩ː","sk:p","sk:b","sk:t","sk:d","sk:c","sk:ɟ","sk:k","sk:g","sk:ts","sk:dz","sk:tʃ","sk:dʒ","sk:f","sk:v","sk:w","sk:s","sk:z","sk:ʃ","sk:ʒ","sk:x","sk:ɦ","sk:m","sk:n","sk:ɲ","sk:ŋ","sk:l","sk:ʎ","sk:r","sk:j"],"voices": ["sk_f3","sk_f2","sk_m1"],"mel_mean": -5.9344089481310744,"mel_std": 2.3695238543771113,"sample_rate": 24000,"hop_length": 256,"n_mels": 100,"delivery": {"n_timesteps": 10,"temperature": 0.667,"dur_temperature": 0.7,"guidance": 1.5,"length_scale": 1.04,"pause_scale": 1.0,"max_pause": 18,"max_final": 1.25,"short_scale": 0.85,"long_scale": 1.12,"min_vowel": 6,"min_phone": 3,"max_tail": 8,"max_stop": 42},"eq_voices": ["sk_f2","sk_m1"],"vocoder": "nvidia/bigvgan_base_24khz_100band","training_step": 4000,"parameters": {"acoustic_model": 41830028},"languages": ["sk"],"note": "Bilingual table (English ids first, then sk:<symbol>); the Slovak frontend's tokens map to sk: ids, <pad> <bos> <eos> <unk> are shared. Voice rows include each voice's own style."}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206{"model": {"n_feats": 100,"spk_dim": 256,"enc_dim": 256,"enc_layers": 6,"enc_heads": 4,"dec_dim": 512,"dec_layers": 10,"dec_heads": 8,"dropout": 0.1,"dec_dropout": 0.0,"p_uncond": 0.1,"phone_pos": true,"dur_flow": true,"dur_dim": 192,"dur_layers": 3,"t_uniform": 0.2,"n_styles": 0,"ctx_dim": 0,"p_ctx_drop": 0.1},"symbols": ["<pad>","<bos>","<eos>","<unk>","▁",",",".","!","?","AA0","AA1","AA2","AE0","AE1","AE2","AH0","AH1","AH2","AO0","AO1","AO2","AW0","AW1","AW2","AY0","AY1","AY2","EH0","EH1","EH2","ER0","ER1","ER2","EY0","EY1","EY2","IH0","IH1","IH2","IY0","IY1","IY2","OW0","OW1","OW2","OY0","OY1","OY2","UH0","UH1","UH2","UW0","UW1","UW2","B","CH","D","DH","F","G","HH","JH","K","L","M","N","NG","P","R","S","SH","T","TH","V","W","Y","Z","ZH","sk:<s>","sk:<q>","sk:<wh>","sk:<e>","sk:|1","sk:|2","sk:|3","sk:|4","sk:▁","sk:ˈ","sk:a","sk:e","sk:i","sk:o","sk:u","sk:aː","sk:eː","sk:iː","sk:oː","sk:uː","sk:ia","sk:ie","sk:iu","sk:uo","sk:r̩","sk:r̩ː","sk:l̩","sk:l̩ː","sk:p","sk:b","sk:t","sk:d","sk:c","sk:ɟ","sk:k","sk:g","sk:ts","sk:dz","sk:tʃ","sk:dʒ","sk:f","sk:v","sk:w","sk:s","sk:z","sk:ʃ","sk:ʒ","sk:x","sk:ɦ","sk:m","sk:n","sk:ɲ","sk:ŋ","sk:l","sk:ʎ","sk:r","sk:j"],"voices": ["sk_a"],"mel_mean": -5.9344089481310744,"mel_std": 2.3695238543771113,"sample_rate": 24000,"hop_length": 256,"n_mels": 100,"delivery": {"guidance": 1.5,"length_scale": 1.04,"pause_scale": 1.0,"max_pause": 18,"max_final": null,"short_scale": 1.0,"long_scale": 1.0,"min_vowel": 0.0,"min_phone": 0.0,"max_tail": 8,"max_stop": 42,"n_timesteps": 10,"temperature": 0.667,"dur_temperature": 0.7},"eq_voices": [],"vocoder": "vocoder.safetensors: nvidia/bigvgan_base_24khz_100band fine-tuned on this voice (MIT)","training_step": 3000,"parameters": {"acoustic_model": 41829516},"languages": ["sk"],"note": "Bilingual table (English ids first, then sk:<symbol>); the Slovak frontend's tokens map to sk: ids, <pad> <bos> <eos> <unk> are shared. Voice rows include each voice's own style.","soft_glide": {"after": ["c","ɟ","ɲ"],"before": {"e": 0.7,"eː": 0.7},"insert": "j"}}
123version https://git-lfs.github.com/spec/v1oid sha256:45ff279aae3a06a9577bbcac1f4b0f0ef0d220839b3d10c077bc10207d1247f5size 167346960123version https://git-lfs.github.com/spec/v1oid sha256:380ea5914f6773edd5c088842292ecb131cf46258630b1202174d8b7d33475a6size 167344912
1234567899 unmodified lines192021222324254 unmodified lines303132333435363738394041424344454647482 unmodified lines51525354555657585931 unmodified lines9192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281293 unmodified lines1331341351361371381391401411421431441451461471481491501511526 unmodified lines159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208"""Slovak text-to-speech by husto (TTS-husto v4.0): three original Slovak voices, 24 kHz.from tts_slovak import SlovakTTStts = SlovakTTS.from_pretrained("path/to/TTS-husto") # or SlovakTTS.from_pretrained() to download itwav = tts("Dobrý deň, ako sa máte?", voice="sk_f3") # float32 numpy array, 24 000 Hztts.save("Dobrý deň.", "out.wav", voice="sk_m1")Runs on onnxruntime (CPU by default) with the same graphs and the same steps as the browser demo (web/tts.js): theproject's Slovak frontend (numbers with declension, abbreviations, G2P) -> text encoder and duration flow -> the9 unmodified linesimport numpy as np__all__ = ["SAMPLE_RATE", "SlovakTTS"]__version__ = "4.0"SAMPLE_RATE, HOP, N_MELS = 24000, 256, 100MEL_FLOOR = float(np.log(1e-5))4 unmodified linesreturn np.round(x) # numpy rounds half to even, as torch.rounddef durations(ids: list[int], w: np.ndarray, d: dict, sets: dict) -> np.ndarray:"""Frames per token from the drawn ones, with the delivery settings in the order of SkttsV2.synthesise."""ids = np.asarray(ids)x = np.asarray(w, dtype=np.float64) * d["length_scale"]has = {k: np.isin(ids, list(v)) for k, v in sets.items()}stop, punct = has["stop"], has["pause"] & ~has["stop"]x = np.where(has["short"], x * d["short_scale"], x)x = np.where(has["long"], x * d["long_scale"], x)x = np.where(punct, x * d["pause_scale"], x)x = np.where(stop, np.minimum(x, d["max_stop"]), x)x = np.where(punct, np.minimum(x, d["max_pause"]), x)vow = has["vowel"]if vow.any():cap = d["max_final"] * np.sort(x[vow])[(vow.sum() - 1) // 2] # torch.median: the lower middle valuelast = -1for i in range(len(ids)):2 unmodified lineselif stop[i] and last >= 0:x[last] = min(x[last], cap)last = -1x = np.where(has["phone"], np.maximum(x, d["min_phone"]), x)x = np.where(vow, np.maximum(x, d["min_vowel"]), x)x = np.where(has["tail"], np.minimum(x, d["max_tail"]), x)return np.maximum(1, _round_half_even(x)).astype(np.int64)31 unmodified linesreturn np.concatenate([np.zeros(lead_n, np.float32), x * gain, np.zeros(tail_n, np.float32)]).astype(np.float32)class SlovakTTS:def __init__(self, path: str | Path, providers: list[str] | None = None):import onnxruntime as ortfrom .frontend import Frontendself.path = Path(path)web = self.path / "web"self.meta = json.loads((web / "voices.json").read_text(encoding="utf-8"))opts = ort.SessionOptions()providers = providers or ["CPUExecutionProvider"]self.text, self.decoder, self.vocoder = (ort.InferenceSession(str(web / f"{n}.onnx"), opts, providers=providers)for n in ("text", "decoder", "bigvgan"))self.frontend = Frontend()m = self.metaself.id = {s: i for i, s in enumerate(m["symbols"])}self.sets = {k: set(v) for k, v in m["token_sets"].items()}self.sets.update(pause=set(m["pause_tokens"]), stop=set(m["stop_tokens"]))self.voices = list(m["voices"])@classmethoddef from_pretrained(cls, path: str | Path | None = None, revision: str = "v4.0", **kw) -> SlovakTTS:if path is None or not Path(path).is_dir():from huggingface_hub import snapshot_downloadpath = snapshot_download(path or REPO, revision=revision, allow_patterns=["web/*"])return cls(path, **kw)def ids(self, tokens: list[str]) -> list[int]:"""Frontend tokens -> ids of the bilingual table (sk:<symbol>; <pad> <bos> <eos> <unk> are shared)."""shared, unk = set(self.meta["symbols"][:4]), self.id["<unk>"]return [self.id[t] if t in shared else self.id.get("sk:" + t, unk) for t in tokens]def sentences(self, text: str) -> list[tuple[str, list[str], bool]]:"""(normalized sentence, tokens, last of its paragraph) for every sentence of the text."""3 unmodified linesout.append((u.text, t, "|4" in t[-2:]))return outdef mel(self, tokens: list[str], voice: str = "sk_f3", seed: int = 0, steps: int | None = None,length_scale: float | None = None, noise: dict | None = None) -> tuple[np.ndarray, np.ndarray]:"""One sentence -> (mel [100, F] in mel units, frames per token). ``noise`` {dur, z}: given draws (tests)."""m, d = self.meta, dict(self.meta["delivery"])if length_scale is not None:d["length_scale"] = length_scalerng = np.random.default_rng(seed)ids = self.ids(tokens)n = len(ids)spk = np.asarray([m["voices"][voice]], np.float32)zd = (np.asarray(noise["dur"], np.float32) if noise else rng.standard_normal(n).astype(np.float32))h, w = self.text.run(None, {"ids": np.asarray([ids], np.int64), "spk": spk,"z": (zd * m["dur_temperature"]).astype(np.float32)[None]})dur = durations(ids, w[0], d, self.sets)idx = np.repeat(np.arange(n), dur)F = len(idx)cond, pos = h[0][idx][None].astype(np.float32), phone_position(dur)[None]6 unmodified linesg = d["guidance"]for i in range(steps):feeds = {"z": z, "cond": cond, "t": np.asarray([ts[i]], np.float32), "spk": spk, "pos": pos}(v,) = self.decoder.run(None, feeds)if g > 0:(u,) = self.decoder.run(None, {**feeds, "cond": zero_cond, "pos": zero_pos})v = v + g * (v - u)z = (z + (ts[i + 1] - ts[i]) * v).astype(np.float32)mel = (z[0] * m["mel_std"] + m["mel_mean"]).T.copy() # [100, F]frame_tok = np.asarray(ids)[idx]if voice in m.get("eq_voices", []): # the s/c/z equaliser, faded in and out over 5 frameshit = np.isin(frame_tok, list(self.sets["eq"])).astype(np.float32)weight = np.convolve(hit, np.ones(5) / 5, mode="same")mel += weight[None, :] * np.asarray(m["eq_gain"], np.float32)[:, None]k = 0while k < n and ids[k] in self.sets["lead"]:k += 1mel[:, :int(dur[:k].sum())] = MEL_FLOOR # the lead-in (<bos>, sentence type, stress) as silencemel[:, np.isin(frame_tok, list(self.sets["tail"]))] = MEL_FLOOR # and the <eos> tailreturn mel.astype(np.float32), durdef wave(self, mel: np.ndarray, block: int = 128, context: int = 32) -> np.ndarray:"""BigVGAN in blocks of 128 frames with 32 frames of context on each side (bounded memory, same samples)."""F = mel.shape[1]out = np.zeros(F * HOP, np.float32)for start in range(0, F, block):end = min(start + block, F)left, right = max(0, start - context), min(F, end + context)(w,) = self.vocoder.run(None, {"mel": mel[None, :, left:right]})out[start * HOP:end * HOP] = w[0, 0, (start - left) * HOP:(end - left) * HOP]return np.clip(out, -1, 1)def stream(self, text: str, voice: str = "sk_f3", seed: int = 0, sentence_gap: float | None = None,paragraph_gap: float = 0.7, **kw):"""One float32 chunk per sentence, each ending in its pause."""if voice not in self.voices:raise ValueError(f"unknown voice {voice!r}; this model has {', '.join(self.voices)}")gap = self.meta["delivery"]["sentence_gap"] if sentence_gap is None else sentence_gapfor k, (_, tokens, para_end) in enumerate(self.sentences(text)):mel, _ = self.mel(tokens, voice, seed + k, **kw)yield finish(self.wave(mel), 0.15 if k == 0 else 0.0, paragraph_gap if para_end else gap)def __call__(self, text: str, voice: str = "sk_f3", **kw) -> np.ndarray:chunks = list(self.stream(text, voice, **kw))return np.concatenate(chunks) if chunks else np.zeros(0, np.float32)def save(self, text: str, path: str | Path, voice: str = "sk_f3", **kw) -> Path:import soundfile as sfsf.write(str(path), self(text, voice, **kw), SAMPLE_RATE, subtype="PCM_16")1234567891011129 unmodified lines222324252627284 unmodified lines3334353637383940414243444546474849505152535455562 unmodified lines5960616263646566676831 unmodified lines1001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821833 unmodified lines1871881891901911921931941951961971981992002012022032042052062072086 unmodified lines215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263"""Slovak text-to-speech by husto (TTS-husto v5.0): the Slovak voice sk_a, 24 kHz.from tts_slovak import SlovakTTStts = SlovakTTS.from_pretrained("path/to/TTS-husto") # or SlovakTTS.from_pretrained() to download itwav = tts("Dobrý deň, ako sa máte?") # float32 numpy array, 24 000 Hztts.save("Dobrý deň.", "out.wav")web/voices.json carries the delivery: sk_a keeps the timing its speaker has and spells ť ď ň before e with a short j("soft_glide"), as its speaker softens them weakly. The loader also takes the v4.0 layout (sk_f3, sk_f2, sk_m1).Runs on onnxruntime (CPU by default) with the same graphs and the same steps as the browser demo (web/tts.js): theproject's Slovak frontend (numbers with declension, abbreviations, G2P) -> text encoder and duration flow -> the9 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))4 unmodified linesreturn np.round(x) # numpy rounds half to even, as torch.rounddef durations(ids: list[int], w: np.ndarray, d: dict, sets: dict, scale: list[float] | None = None) -> np.ndarray:"""Frames per token from the drawn ones, with the delivery settings in the order of SkttsV2.synthesise(``scale``: per position, the inserted glide; a setting that is None is off)."""ids = np.asarray(ids)x = np.asarray(w, dtype=np.float64) * d["length_scale"]has = {k: np.isin(ids, list(v)) for k, v in sets.items()}stop, punct = has["stop"], has["pause"] & ~has["stop"]x = np.where(has["short"], x * d["short_scale"], x)x = np.where(has["long"], x * d["long_scale"], x)if scale is not None:x = x * np.asarray(scale, dtype=np.float64)x = np.where(punct, x * d["pause_scale"], x)if d.get("max_stop") is not None:x = np.where(stop, np.minimum(x, d["max_stop"]), x)if d.get("max_pause") is not None:x = np.where(punct, np.minimum(x, d["max_pause"]), x)vow = has["vowel"]if vow.any() and d.get("max_final") is not None:cap = d["max_final"] * np.sort(x[vow])[(vow.sum() - 1) // 2] # torch.median: the lower middle valuelast = -1for i in range(len(ids)):2 unmodified lineselif stop[i] and last >= 0:x[last] = min(x[last], cap)last = -1x = np.where(has["phone"], np.maximum(x, d.get("min_phone") or 0), x)x = np.where(vow, np.maximum(x, d.get("min_vowel") or 0), x)if d.get("max_tail") is not None:x = np.where(has["tail"], np.minimum(x, d["max_tail"]), x)return np.maximum(1, _round_half_even(x)).astype(np.int64)31 unmodified linesreturn np.concatenate([np.zeros(lead_n, np.float32), x * gain, np.zeros(tail_n, np.float32)]).astype(np.float32)class _Model:"""One browser model folder: text.onnx, decoder.onnx, bigvgan.onnx, voices.json."""def __init__(self, web: Path, providers: list[str]):import onnxruntime as ortself.meta = json.loads((web / "voices.json").read_text(encoding="utf-8"))opts = ort.SessionOptions()self.text, self.decoder, self.vocoder = (ort.InferenceSession(str(web / f"{n}.onnx"), opts, providers=providers)for n in ("text", "decoder", "bigvgan"))m = self.metaself.id = {s: i for i, s in enumerate(m["symbols"])}self.sets = {k: set(v) for k, v in m["token_sets"].items()}self.sets.update(pause=set(m["pause_tokens"]), stop=set(m["stop_tokens"]))def ids(self, tokens: list[str]) -> tuple[list[int], list[float] | None]:"""Frontend tokens -> ids of the bilingual table (sk:<symbol>; <pad> <bos> <eos> <unk> are shared), and thelength scale per position when voices.json has a "soft_glide" {after, before: {vowel: length}, insert}: thetoken "insert" between one of "after" and such a vowel, at that part of its drawn length."""g, scale = self.meta.get("soft_glide"), Noneif g:before = g["before"] if isinstance(g["before"], dict) else dict.fromkeys(g["before"], 1.0)out, scale = [], []for i, t in enumerate(tokens):out.append(t)scale.append(1.0)s = before.get(tokens[i + 1], 0) if t in g["after"] and i + 1 < len(tokens) else 0if s > 0:out += [g["insert"]]scale.append(float(s))tokens = outshared, unk = set(self.meta["symbols"][:4]), self.id["<unk>"]return [self.id[t] if t in shared else self.id.get("sk:" + t, unk) for t in tokens], scaleMODELS = ("web",) # model folders; each voices.json names its voicesclass SlovakTTS:def __init__(self, path: str | Path, providers: list[str] | None = None):from .frontend import Frontendself.path = Path(path)self.providers = providers or ["CPUExecutionProvider"]self.frontend = Frontend()self._models: dict[str, _Model] = {}self._folder = {} # voice -> model folder (present in the downloaded files)for folder in MODELS:web = self.path / folderif (web / "voices.json").exists():for v in json.loads((web / "voices.json").read_text(encoding="utf-8"))["voices"]:self._folder[v] = folderself.voices = list(self._folder)def model(self, voice: str) -> _Model:if voice not in self._folder:raise ValueError(f"unknown voice {voice!r}; this model has {', '.join(self.voices)}")folder = self._folder[voice]if folder not in self._models:self._models[folder] = _Model(self.path / folder, self.providers)return self._models[folder]@propertydef meta(self) -> dict:return 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_downloadpath = snapshot_download(path or REPO, revision=revision, allow_patterns=["web/*"])return cls(path, **kw)def ids(self, tokens: list[str], voice: str | None = None) -> list[int]:voice = voice or self.voices[0]return self.model(voice).ids(tokens)[0]def sentences(self, text: str) -> list[tuple[str, list[str], bool]]:"""(normalized sentence, tokens, last of its paragraph) for every sentence of the text."""3 unmodified linesout.append((u.text, t, "|4" in t[-2:]))return outdef mel(self, tokens: list[str], voice: str | None = None, seed: int = 0, steps: int | None = None,length_scale: float | None = None, noise: dict | None = None) -> tuple[np.ndarray, np.ndarray]:"""One sentence -> (mel [100, F] in mel units, frames per token). ``noise`` {dur, z}: given draws (tests)."""voice = voice or self.voices[0]mod = self.model(voice)m, d = mod.meta, dict(mod.meta["delivery"])if length_scale is not None:d["length_scale"] = length_scalerng = np.random.default_rng(seed)ids, scale = mod.ids(tokens)n = len(ids)spk = np.asarray([m["voices"][voice]], np.float32)zd = (np.asarray(noise["dur"], np.float32) if noise else rng.standard_normal(n).astype(np.float32))h, w = mod.text.run(None, {"ids": np.asarray([ids], np.int64), "spk": spk,"z": (zd * m["dur_temperature"]).astype(np.float32)[None]})dur = durations(ids, w[0], d, mod.sets, scale)idx = np.repeat(np.arange(n), dur)F = len(idx)cond, pos = h[0][idx][None].astype(np.float32), phone_position(dur)[None]6 unmodified linesg = d["guidance"]for i in range(steps):feeds = {"z": z, "cond": cond, "t": np.asarray([ts[i]], np.float32), "spk": spk, "pos": pos}(v,) = mod.decoder.run(None, feeds)if g > 0:(u,) = mod.decoder.run(None, {**feeds, "cond": zero_cond, "pos": zero_pos})v = v + g * (v - u)z = (z + (ts[i + 1] - ts[i]) * v).astype(np.float32)mel = (z[0] * m["mel_std"] + m["mel_mean"]).T.copy() # [100, F]frame_tok = np.asarray(ids)[idx]if voice in m.get("eq_voices", []): # the s/c/z equaliser, faded in and out over 5 frameshit = np.isin(frame_tok, list(mod.sets["eq"])).astype(np.float32)weight = np.convolve(hit, np.ones(5) / 5, mode="same")mel += weight[None, :] * np.asarray(m["eq_gain"], np.float32)[:, None]k = 0while k < n and ids[k] in mod.sets["lead"]:k += 1mel[:, :int(dur[:k].sum())] = MEL_FLOOR # the lead-in (<bos>, sentence type, stress) as silencemel[:, np.isin(frame_tok, list(mod.sets["tail"]))] = MEL_FLOOR # and the <eos> tailreturn mel.astype(np.float32), durdef wave(self, mel: np.ndarray, block: int = 128, context: int = 32, voice: str | None = None) -> np.ndarray:"""BigVGAN in blocks of 128 frames with 32 frames of context on each side (bounded memory, same samples)."""F = mel.shape[1]out = np.zeros(F * HOP, np.float32)for start in range(0, F, block):end = min(start + block, F)left, right = max(0, start - context), min(F, end + context)(w,) = self.model(voice or self.voices[0]).vocoder.run(None, {"mel": mel[None, :, left:right]})out[start * HOP:end * HOP] = w[0, 0, (start - left) * HOP:(end - left) * HOP]return np.clip(out, -1, 1)def stream(self, text: str, voice: str | None = None, seed: int = 0, sentence_gap: float | None = None,paragraph_gap: float = 0.7, **kw):"""One float32 chunk per sentence, each ending in its pause."""voice = voice or self.voices[0]gap = self.model(voice).meta["delivery"]["sentence_gap"] if sentence_gap is None else sentence_gapfor k, (_, tokens, para_end) in enumerate(self.sentences(text)):mel, _ = self.mel(tokens, voice, seed + k, **kw)yield finish(self.wave(mel, voice=voice), 0.15 if k == 0 else 0.0, paragraph_gap if para_end else gap)def __call__(self, text: str, voice: str | None = None, **kw) -> np.ndarray:chunks = list(self.stream(text, voice, **kw))return np.concatenate(chunks) if chunks else np.zeros(0, np.float32)def save(self, text: str, path: str | Path, voice: str | None = None, **kw) -> Path:import soundfile as sfsf.write(str(path), self(text, voice, **kw), SAMPLE_RATE, subtype="PCM_16")
12341 unmodified line6789101112131415161718"""python -m tts_slovak "Dobrý deň." out.wav [--voice sk_f3|sk_f2|sk_m1] [--seed 0] [--steps 10] [--model DIR]"""import argparseimport time1 unmodified linedef main() -> None:ap = argparse.ArgumentParser(description="Slovak text-to-speech (TTS-husto v4.0)")ap.add_argument("text")ap.add_argument("out", help="output .wav (24 kHz)")ap.add_argument("--voice", default="sk_f3", choices=["sk_f3", "sk_f2", "sk_m1"])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 v4.0)")a = ap.parse_args()tts = SlovakTTS.from_pretrained(a.model)t0 = time.perf_counter()12341 unmodified line6789101112131415161718"""python -m tts_slovak "Dobrý deň." out.wav [--voice sk_a] [--seed 0] [--steps 10] [--model DIR]"""import argparseimport time1 unmodified linedef main() -> None:ap = argparse.ArgumentParser(description="Slovak text-to-speech (TTS-husto 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()
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547# Foreign (mostly English) names and words as Slovak readers say them: word<TAB>Slovak respelling.# The respelling is read with hard d/t/n/l (deti -> ďeti does not apply; write ď ť ň ľ where a soft one is meant).# Inflected forms (Bidena, Trumpovi, Washingtone) are found by their stem: the Slovak ending is kept as written.# Names that are also Slovak names (Peter, Martin, Anna, Daniel, Richard, Robert, David, Adam, ...) are left out.# first namesjohn džonjames džejmsmichael majklwilliam viljemjoseph džouzefcharles čarlsgeorge džordžedward edvardhenry henriharry herijack džekjacob džejkobjoe džoujoel džouljonathan džonatanjeff džefjeffrey džefrijerry džerijim džimjimmy džimijennifer dženiferjessica džesikajane džejnjanet dženetjulia džúliajulie džúlijustin džastinjason džejsnjordan džordnjosh džošjoshua džošuajake džejkjay džejjean žánsteve stívsteven stívnstephen stívnbill bilbilly bilibob bobbobby bobimike majkmary merisarah seraemily emiliemma emaelizabeth elizabetkate kejtkatherine keterincatherine keterinkevin kevinbrian brajenryan rajenmatthew metjuandrew endrúanthony entonichristopher kristoferchris krisnicholas nikolastimothy timotitim timtommy tomithomas tomaspaul pólmark markscott skotgary gerilarry lerieric erikjustine džastinkim kimlisa lísanancy nensiamy ejmimegan megenrachel rejčlrebecca rebekahillary hilaritaylor tejlorkelly keliashley ešlibrandon brendntyler tajlerdylan dilenelon ílonmitch mičkamala kamalabarack barakmelania melániaivanka ivankakeanu kianuleonardo leonardobrad bredangelina endželínajohnny džoniwill vildenzel denzlmorgan morgenmeryl meriljulianne džulienscarlett skarletnatalie netalioprah opraellen elenbeyonce bijonsejrihanna rijanashakira šakiraadele adeleminem eminemdrake drejkkanye kanjejustin džastinselena selínamiley majlibritney britniwhitney vitnimariah marajaceline selínelton eltonfreddie fredimick mikkeith kítozzy ozikurt kurt# surnames and well-known peoplesmith smitjohnson džonsonjackson džeksonjones džounsbrown braunwilliams viljemswilson vilsontaylor tejlordavis dejvismiller milermoore múrwhite vajtharris herisclark klarklewis luiswalker vókeryoung jangking kingwright rajthill hilgreen grínbaker bejkeradams edemsnelson nelsoncarter kartermitchell mičelroberts robertsturner törnerphillips filipscampbell kembelparker parkerevans evensedwards edvardscollins kolinzstewart stjuartmorris moriscook kukrogers rodžersreed rídbell belmurphy merfibailey bejlicooper kúperhoward haurdward vordcox koksrichardson ričardsonwood vudwatson votsonbrooks brukskelly keliprice prajsbennett benetgray grejjames džejmshughes hjúzwashington vošingtonlincoln linknjefferson džefersonroosevelt rúzveltkennedy kenedinixon niksonreagan rejgnclinton klintonbush bušobama obamatrump trampbiden bajdenharris herispence pensvance venspelosi pelousisanders sendrscheney čejnischwarzenegger švarcenegerchurchill čerčilthatcher tečerblair blercameron kemeronboris borisstarmer starmersunak sunakmusk maskgates gejtsjobs džobszuckerberg cukerbergbezos bejzosbuffett bafetaltman oltmanwozniak vozňaknewton ňjútndarwin darvineinstein ajnštajnshakespeare šejkspírdickens dikenshemingway hemingvejtwain tvejntolkien tolkínrowling roulinkorwell orvelausten ostinpoe poustephen stívnhawking hokinkspielberg spílbergtarantino tarantínonolan noulenhitchcock hičkokchaplin čaplindisney diznipresley preslisinatra sinatralennon lenonmccartney mekartnijagger džegermadonna madonaswift sviftgaga gagabieber bíbersheeran šírendicaprio dikapriodepp deppitt pitjolie džolícruise krúzhanks henksclooney klúnistreep strípwinfrey vinfrijordan džordnlebron lebronbryant brajentkobe koubitiger tajgerwoods vudzfederer federernadal nadaldjokovic ďokovičserena serínavenus vínusbeckham bekemmessi mesironaldo ronaldoholmes houmzsherlock šerlokwatson votsonpotter poterhermione hermajonibatman betmensuperman supermanspiderman spajdrmen# placesyork jorknew ňújersey džerzichicago šikágoangeles endželesseattle sietlboston bostonmiami majamihouston hjústondallas delesatlanta atlantadetroit ditrojtphiladelphia filadelfiapittsburgh pitsburgdenver denverphoenix fíniksvegas vegasorleans orlínshollywood holivudmanhattan menhetnbrooklyn bruklinbroadway brodvejharvard hárvardyale jejlprinceton prinstonstanford stenfordoxford oksfordcambridge kejmbridžmanchester mančesterliverpool liverpúlbirmingham birmingemedinburgh edinburgglasgow glazgoudublin dablinbelfast belfastwales vejlzscotland skotlendengland inglandsydney sidnimelbourne melburntoronto torontovancouver venkúvermontreal montrealottawa otavavirginia virdžíniacarolina karolajnaohio ouhajouutah jútanevada nevadaoregon oregonhawaii havajalaska aljaškawall vólstreet strítsilicon silikonvalley velitimes tajmssquare skvérwhite vajthouse hauspentagon pentagonwimbledon vimbldnheathrow hítrou# companies, products, mediamicrosoft majkrosoftapple eplgoogle gúglyoutube jútjúbfacebook fejsbuktwitter tviterwhatsapp vatsapinstagram instagramnetflix netflixamazon amazoniphone ajfounipad ajpedipod ajpodimac ajmekmacbook mekbukwindows vindousoffice ofisword vördexcel ekselpowerpoint pauerpojntxbox iksboksplaystation plejstejšnnintendo nintendonvidia envidiaintel inteloracle orekladobe edoubiphotoshop fotošopspotify spotifajuber úberairbnb érbíenbípaypal pejpelebay íbejlinkedin linktinsnapchat snepčettiktok tiktokchatgpt četdžípítíopenai oupenejájanthropic entropikclaude klódgemini džeminicopilot koupajlotandroid androidchrome kroumsafari safarifirefox fajerfoksyahoo jahúdisney dizniwarner vornerparamount peramauntmarvel marvelpixar piksarhbo ejčbíoucnn síenenbbc bíbísífox foksreuters rojtersbloomberg blúmbergstarbucks starbaksmcdonalds mekdonaldsburger burgercoca kokacola kolapepsi pepsiwalmart volmartboeing boingtesla teslaspacex spejsekschevrolet ševroletjeep džípharley harlidavidson dejvidsoncadillac kadilakford forddell dellenovo lenovosony soninike najkiadidas adidasreebok ríboklevis lívajslego lego# wordsweekend víkendshow šoushop šopshopping šopinkonline onlajnoffline oflajnemail ímejlmail mejlsmartphone smartfónlaptop leptopnotebook noutbukcool kúlteam tímleader lídermanager menedžermanagement menedžmentjazz džezblues blúzcountry kantrirap reprapper reperdesign dizajndesigner dizajnérstartup startapbusiness biznisbrowser brauzerupdate apdejtdownload daunloudupload aploudstreaming stríminkstream strímpodcast podkástinfluencer influenserlike lajkplaylist plejlistgame gejmgamer gejmergaming gejminkwifi vajfajbluetooth blútútapp epchat četcloud klaudwebsite vebsajtweb vebhalloween helouvínchristmas krismasfriday frajdejblack blekteenager tínedžerbaseball bejzbolfootball futbolhockey hokejsuper superbowl bouloscar oskargrammy gremiemmy emihit hitfair férfake fejknews ňjúzselfie selfihashtag hešteksmart smarthappy hepiend endokay okejok okejsorry sorithriller trilerhorror hororhamburger hamburgersandwich sendvičketchup kečuphot hotdog dogfast fástfood fúddrink drinkcocktail koktejlwhisky viskiwhiskey viskibacon bejkntoast toustbrunch brančsoftball softbolskateboard skejtbordsnowboard snoubordsurf sörfjeans džínsyt-shirt tíšörtmake mejkup apthe dof ofand end# Slovak words that would match an entry above with a case endingmichaela michaelamichaely michaelymichaele michaelemichaelu michaelumichaelou michaelou# more names and stems for declined forms (Chicaga, Seattli)chicag šikágseattl sietlsawyer sojerdjokovič ďokovičbeatles bítlsrolling roulinkstones stounzunited junajtidwinston vinstonisaac ajzeked edwi vajwebb vebtexas texas142 unmodified lines143144145142 unmodified linesateliér*kontext*petíc*142 unmodified lines143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478142 unmodified linesateliér*kontext*petíc*# --- added 2026-12-01: loans the frontend still softened (video -> viďeo, limit -> ľimit, genetika -> geňeťika),# collected from the Common Voice / lili / FLEURS / TrePal test sentences. Native words that share a start are kept out# (divadlo, list, rodina, hodina, teraz, tento, desať, Nitra, polievka, videl, radi).videovideávideívideáchvideomvideurádiorádiarádiurádiomrádiárádio*metermetrametremetrovmetramimetrochcentimet*kilomet*milimet*limit*satelit*determin*univerz*nikot*tibet*genet*genit*dinosaur*organiz*komunik*komunit*digit*pozit*efekt*exist*monitor*solidar*komplex*koordin*integr*iniciat*lisabon*pesticíd*kolektív*intenzi*intenzít*invest*mechaniz*humanit*ventil*dispon*dispozíc*aktív*aktiv*problemat*potenciál*asisten*logist*automat*minim*maxim*kritéri*onlinelicen*magnet*kompeten*alternat*harmon*harmón*región*regionál*kvalifik*flexib*administr*aktuál*aktualiz*identi*realiz*realist*individu*perspekt*atrakt*libralibierlibryliber*strateg*stratég*diskut*diskrimin*disciplín*audio*stabil*atlant*transatlant*štúdi*frontexkozmet*batéri*dinár*model*artéri*feder*konfeder*transparent*tradíc*tradi*latin*civiliz*civilist*subsidiar*konštrukt*deštrukt*demograf*brazíl*implement*globál*diagnost*identit*kardinál*kriminal*kriminál*cyklist*argentín*lokalit*relatív*extrém*respondent*kognit*robot*fantast*akustik*artikul*atlet*sediment*likvid*gymnast*dividend*anti*komplik*dramat*informatiz*geopolit*konzistent*bilaterál*evidenc*analyt*intelekt*primitív*alkohol*modifik*produkt*diverzif*biodiverz*radikal*radikál*central*centrál*futbalist*statív*konsolid*ekliptik*hypotet*audiovizu*evanjeli*normál*manipul*virtuál*virtual*aritmet*exponenc*experiment*estet*inteligen*reštruktur*suverén*environment*systemat*kvantit*amatér*anticip*poet*heraldik*seriál*milión*štandard*totál*lotéri*baktéri*galéri*fóli*línialínielíniulínioulíniipolíciapolíciepolíciupolícioupolíciipolicaj*austrál*indi*motív*motiv*kódex*imunit*alianc*kulis*patent*maklér*asteroid*elimin*kompatib*syntet*hyper*chromat*austronéz*audienc*katolic*degres*reštrikt*marketing*kondíc*kondic*guvernér*štadión*displej*štipend*aristotel*extern*protest*štruktúr*štruktur*stimul*formál*optimal*optim*indikát*koalíc*magnetof*reprezent*komercial*koexist*kapitalist*byrokrat*priorit*dimenz*catering*celibát*citadel*fikt*bowling*deoxyrib*kontradikt*rezidenc*profesionál*gotick*dekorác*twitter*asertív*asertiv*domíni*pontifik*melódi*sternumdelimit*skléraoliv*teras*putin*kolóni*bibli*teológ*nanotechn*komponent*kontinu*faktick*ratifik*skeptick*nacionalist*anglick*angličt*optick*mobilit*distrib*index*klimatick*sociál*kultúr*# 2026-12-03: loans the corpus check found softeneddebat*depres*diét*diet*dilem*direkt*elit*elektr*klinik*link*partner*planét*problém*systém*tréner*trénin*delfín*lineár*líder*mentalit*sentiment*tematick*temperatúr*tenzi*teritori*toleran*totalit*dirig*diktát*diskot*nikel*nitrát*notifik*légi*lemon*kandidat*
56 unmodified lines575859606162636465666768698 unmodified lines787980818283842 unmodified lines8788899091929370 unmodified lines16416516616716816917017117217317456 unmodified linesreturn frozenset(exact), tuple(prefixes)def is_hard_loan(word: str) -> bool:exact, prefixes = _hard_lexicon()return word in exact or word.startswith(prefixes)def _graphemes_to_phonemes(word: str) -> list[str]:hard = is_hard_loan(word)out: list[str] = []i, n = 0, len(word)while i < n:8 unmodified linesi += 2continueif two in ("ia", "ie", "iu"):if hard and word[i + 2:] in ("", "m"): # loan endings -ia/-ie/-iu/-ium: energia -> e n e r g i j aout.extend(["i", "j", two[1]])else:out.append(two)2 unmodified linesif c in _SOFTEN:nxt = word[i + 1] if i + 1 < n else ""soft = nxt in _SOFT_TRIGGERif soft and not hard:# "ste" is pronounced hard: ste, stenaif not (c == "t" and nxt == "e" and i > 0 and word[i - 1] == "s"):out.append(_SOFTEN[c])70 unmodified lines@lru_cache(maxsize=50000)def g2p_word(word: str) -> tuple[str, ...]:"""Lexical phonemes of one lowercase orthographic word (before cross-word sandhi)."""word = unicodedata.normalize("NFC", word.lower())word = re.sub(r"[^a-záäčďéíľĺňóôŕšťúýž]", "", word)ph = _graphemes_to_phonemes(word)ph = _nasal(_syllabic(ph))return tuple(ph)56 unmodified lines575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401418 unmodified lines1501511521531541551562 unmodified lines15916016116216316416570 unmodified lines23623723823924024124224324424524624756 unmodified linesreturn frozenset(exact), tuple(prefixes)# Native words with a hard d/t/n/l before e/i (Pravidlá slovenskej výslovnosti): the demonstrative ten in all its# e/i forms, jeden, vtedy, teda (ten [ten], tie [tie], jeden [jeden], not ťen, ťie, jeďen). Not "tiež" [ťiež]._NATIVE_HARD = frozenset("ten tento tenže tamten tamtoten tej tejto tejže tamtej tie tieto tiež_ tamtie tí títo tíže tamtí jeden jedenkrát ""teda vtedy dovtedy odvtedy potiaľto_ tenkrát".split()) - {"tiež_", "potiaľto_"}_NATIVE_HARD_PREFIXES = ("jedenás",) # jedenásť, jedenásty, jedenástich# Adjective (and pronoun) endings of the hard pattern keep d/t/n/l hard: mladé, pekného, celému, zlej [zlej], inej.# Only the consonant of the ending (zeleného: zeľeného). The ending needs a stem (the words nej, dej, lej are soft),# and a few nouns and imperatives end the same way._ADJ_END = re.compile(r"(?<=.)([dtnl])(?:é|ého|ému|ej)$")_ADJ_END_SOFT = frozenset("matej nalej vylej zalej prilej odlej polej rozlej dolej prelej nedej".split())def _hard_ending(word: str) -> int:"""Index of the d/t/n/l of a hard adjective ending (mladé -> 3), or -1. The adverbs menej, ďalej (najmenej,naďalej) end the same way but are soft."""if word in _ADJ_END_SOFT or word.endswith(("menej", "ďalej")):return -1m = _ADJ_END.search(word)return m.start(1) if m else -1def is_hard_loan(word: str) -> bool:exact, prefixes = _hard_lexicon()return word in exact or word.startswith(prefixes)_FOREIGN_FILE = Path(__file__).parent / "data" / "foreign.tsv"# Slovak case endings a foreign name takes (Bidena, Trumpovi, Gatesovej, Washingtone), longest first._ENDINGS = ("ovcami", "ovcov", "ových", "ovému", "ovej", "ovou", "ovia", "ovom", "ovým", "ovho", "ovci", "ová", "ovú","ovi", "ova","ovo", "ove", "ovu", "ovy", "och", "ami", "ách", "om", "ou", "ov", "mi", "a", "u", "e", "y", "i")# Letters and clusters a Slovak word never has: a word with one is foreign (w, ph, gh, Mc-, -sh, -ey, -ay). Not# "ck": Slovak has it in every -cký / -cko (politický, Turecko), where it stays c + k._FOREIGN_HINT = re.compile(r"w|ph|gh|^mc|.sh|ey$|ay$")_FOREIGN_RULES = (("sch", "š"), ("sh", "š"), ("ck", "k"), ("ph", "f"), ("gh", "g"), ("wh", "v"), ("w", "v"),("ay", "ej"))@lru_cache(maxsize=1)def _foreign_lexicon() -> dict[str, str]:lex = {}for line in _FOREIGN_FILE.read_text(encoding="utf-8").splitlines():if line.strip() and not line.startswith("#") and "\t" in line:word, spoken = line.split("\t", 1)lex[word.strip().lower()] = spoken.strip()return lex@lru_cache(maxsize=50000)def foreign_respelling(word: str) -> str | None:"""How a Slovak reader says a foreign (mostly English) word, as Slovak spelling read with hard d/t/n/l, or Nonefor a Slovak word: the lexicon (``data/foreign.tsv``), its entries with a Slovak case ending (Bidena ->bajdena), else a few spelling rules for words with letters Slovak never has (Wagner -> vagner, Bush -> buš)."""word = unicodedata.normalize("NFC", word.lower())lex = _foreign_lexicon()if word in lex:return lex[word]for end in _ENDINGS:stem = word[: -len(end)]if word.endswith(end) and len(stem) >= 3 and stem in lex:return lex[stem] + endif word.endswith(end) and len(stem) >= 3 and lex.get(stem + "a", "").endswith("a"): # cola -> colureturn lex[stem + "a"][:-1] + endif len(word) >= 3 and _FOREIGN_HINT.search(word):if word.startswith("mc"):word = "mek" + word[2:]if word.endswith("ey"): # Whitney, Gourleyword = word[:-2] + "i"for a, b in _FOREIGN_RULES:word = word.replace(a, b)return wordreturn Nonedef _graphemes_to_phonemes(word: str, hard: bool = False) -> list[str]:loan = hard or is_hard_loan(word)hard = loan or word in _NATIVE_HARD or word.startswith(_NATIVE_HARD_PREFIXES)hard_at = _hard_ending(word)out: list[str] = []i, n = 0, len(word)while i < n:8 unmodified linesi += 2continueif two in ("ia", "ie", "iu"):if loan and word[i + 2:] in ("", "m"): # loan endings -ia/-ie/-iu/-ium: energia -> e n e r g i j aout.extend(["i", "j", two[1]])else:out.append(two)2 unmodified linesif c in _SOFTEN:nxt = word[i + 1] if i + 1 < n else ""soft = nxt in _SOFT_TRIGGERif soft and not hard and i != hard_at:# "ste" is pronounced hard: ste, stenaif not (c == "t" and nxt == "e" and i > 0 and word[i - 1] == "s"):out.append(_SOFTEN[c])70 unmodified lines@lru_cache(maxsize=50000)def g2p_word(word: str, hard: bool = False) -> tuple[str, ...]:"""Lexical phonemes of one lowercase orthographic word (before cross-word sandhi); ``hard``: no softening ofd/t/n/l (a foreign word's respelling)."""word = unicodedata.normalize("NFC", word.lower())word = re.sub(r"[^a-záäčďéíľĺňóôŕšťúýž]", "", word)ph = _graphemes_to_phonemes(word, hard)ph = _nasal(_syllabic(ph))return tuple(ph)
7 unmodified lines891011121314158 unmodified lines1731741751761771781797 unmodified linesfrom . import numbers as Nfrom . import ssmlfrom .g2p import apply_sandhi, g2p_wordfrom .lexicon import CONJUNCTIONS, ENCLITICS, PROCLITICSfrom .normalize import Normalizerfrom .phonemes import (158 unmodified linesraise ValueError(f"unknown phonemes {unknown} in override {override!r} for {word!r}")return phreturn list(g2p_word(override.lower()))return list(g2p_word(word))@staticmethoddef _sentence_type(words: list[str], punct: str) -> str:7 unmodified lines891011121314158 unmodified lines1731741751761771781791807 unmodified linesfrom . import numbers as Nfrom . import ssmlfrom .g2p import apply_sandhi, foreign_respelling, g2p_wordfrom .lexicon import CONJUNCTIONS, ENCLITICS, PROCLITICSfrom .normalize import Normalizerfrom .phonemes import (158 unmodified linesraise ValueError(f"unknown phonemes {unknown} in override {override!r} for {word!r}")return phreturn list(g2p_word(override.lower()))foreign = foreign_respelling(word)return list(g2p_word(foreign, hard=True)) if foreign else list(g2p_word(word))@staticmethoddef _sentence_type(words: list[str], punct: str) -> str:
427 unmodified lines42842943043143243343442 unmodified lines47747847948048148248312 unmodified lines4964974984995005015025 unmodified lines50850951051151251328 unmodified lines54254354454554654754854955055155255355455555640 unmodified lines597598599600601602603427 unmodified linespair = (x_mask[:, :, None] & y_mask[:, None, :]).float()# MAS on the Gaussian log-likelihood of every frame under every token's mu (unit variance); fp32 alwaysfrom .mas import maximum_path # training only (numba)fm = None if feat_mask is None else feat_mask.float()[:, None, :] # [b, 1, n]with torch.no_grad(), torch.autocast(device_type=y.device.type, enabled=False):mu, yf = mu_x.float(), y.float()42 unmodified lineslong_tokens: tuple[int, ...] = (), long_scale: float = 1.0,min_vowel: float = 0.0, min_phone: float = 0.0, phone_tokens: tuple[int, ...] = (),final_free_tokens: tuple[int, ...] = (), tail_tokens: tuple[int, ...] = (),max_tail: float | None = None) -> dict:"""``guidance`` 0 = plain conditional sampling; ``sway`` < 0 spends more steps near the noise end;``pause_scale`` stretches the tokens in ``pause_tokens`` (the punctuation ids) on top of ``length_scale``:the model learns short pauses from read audiobooks, a longer pause at commas reads more naturally.12 unmodified linesAn input holding one of ``final_free_tokens`` (the yes/no question marker) keeps its last vowel uncapped by``max_final``: a rising question needs that time for the rise. ``tail_tokens`` (the end of a sentence,<eos>) are capped at ``max_tail`` frames and come out as silence: sk_f3 drew 59 frames there, a 0.6 s faintcreak after every sentence."""spk = self._speaker(spks, spk_vec, x.shape[0], x.device, style, style_scale)h_x, _, logw, x_mask = self.encoder(x, x_lengths, spk, ctx)# rounded, not ceiled: ceil adds half a frame to every token on average (~6 % slower speech)5 unmodified linesfor tokens, scale in ((short_tokens, short_scale), (long_tokens, long_scale)):if tokens and scale != 1.0:w = torch.where(torch.isin(x, torch.tensor(tokens, dtype=x.dtype, device=x.device)), w * scale, w)if pause_scale != 1.0 and pause_tokens:punct = torch.isin(x, torch.tensor(pause_tokens, dtype=x.dtype, device=x.device)) & ~stopw = torch.where(punct, w * pause_scale, w)28 unmodified linesdur = (torch.round(w).clamp_min(1) * x_mask).long()cond, pos, y_mask, y_lengths = self.expand(h_x, dur)no_pos = torch.zeros_like(pos) if pos is not None else Nonez = torch.randn(x.shape[0], cond.shape[1], self.n_feats, device=x.device, dtype=cond.dtype) * temperaturenoise = zts = torch.linspace(0, 1, n_timesteps + 1, device=x.device)ts = ts + sway * (torch.cos(math.pi / 2 * ts) - 1 + ts)for i in range(n_timesteps):t = ts[i].clamp_min(t_min).expand(x.shape[0])v = self.decoder(z, cond, t, spk, y_mask, pos)if guidance > 0:v = v + guidance * (v - self.decoder(z, torch.zeros_like(cond), t, spk, y_mask, no_pos))z = z + (ts[i + 1] - ts[i]) * vmel = (z * self.mel_std + self.mel_mean) * y_mask[..., None]if eq_tokens and eq_gain is not None:40 unmodified linespitch of the recording (more so for a larger ``t_start``) but has the texture of generated mels, frame forframe aligned with the recorded audio: training data for a vocoder that will only ever see generated mels."""from .mas import maximum_path # numbaspk = self._speaker(spks, None, x.shape[0], x.device)h_x, mu_x, _, x_mask = self.encoder(x, x_lengths, spk)y = (y.transpose(1, 2) - self.mel_mean) / self.mel_std427 unmodified lines42842943043143243342 unmodified lines47647747847948048148248312 unmodified lines4964974984995005015025035045055065075 unmodified lines51351451551651751851952028 unmodified lines54955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857940 unmodified lines620621622623624625427 unmodified linespair = (x_mask[:, :, None] & y_mask[:, None, :]).float()# MAS on the Gaussian log-likelihood of every frame under every token's mu (unit variance); fp32 alwaysfrom .mas import maximum_path # training only (numba)fm = None if feat_mask is None else feat_mask.float()[:, None, :] # [b, 1, n]with torch.no_grad(), torch.autocast(device_type=y.device.type, enabled=False):mu, yf = mu_x.float(), y.float()42 unmodified lineslong_tokens: tuple[int, ...] = (), long_scale: float = 1.0,min_vowel: float = 0.0, min_phone: float = 0.0, phone_tokens: tuple[int, ...] = (),final_free_tokens: tuple[int, ...] = (), tail_tokens: tuple[int, ...] = (),max_tail: float | None = None, soft_pairs: tuple[tuple[int, int], ...] = (),soft_guidance: float = 0.0, soft_spread: int = 2, token_scale=None) -> dict:"""``guidance`` 0 = plain conditional sampling; ``sway`` < 0 spends more steps near the noise end;``pause_scale`` stretches the tokens in ``pause_tokens`` (the punctuation ids) on top of ``length_scale``:the model learns short pauses from read audiobooks, a longer pause at commas reads more naturally.12 unmodified linesAn input holding one of ``final_free_tokens`` (the yes/no question marker) keeps its last vowel uncapped by``max_final``: a rising question needs that time for the rise. ``tail_tokens`` (the end of a sentence,<eos>) are capped at ``max_tail`` frames and come out as silence: sk_f3 drew 59 frames there, a 0.6 s faintcreak after every sentence. ``soft_guidance`` > 0 strengthens the palatal consonants: ``soft_pairs`` maps eachsoft id to its hard partner (ť -> t, ...); the decoder is also asked with those tokens made hard, and on theframes of a soft token and the ``soft_spread`` frames after it (the vowel's onset) the velocity is pushed awayfrom that hard version by ``soft_guidance`` (a voice whose speaker softens weakly: cv_a's ť is no further fromt than in his recordings). ``token_scale`` ([b, n], None = off) multiplies the drawn length of each inputposition (an inserted glide token at part of the length the model gives it)."""spk = self._speaker(spks, spk_vec, x.shape[0], x.device, style, style_scale)h_x, _, logw, x_mask = self.encoder(x, x_lengths, spk, ctx)# rounded, not ceiled: ceil adds half a frame to every token on average (~6 % slower speech)5 unmodified linesfor tokens, scale in ((short_tokens, short_scale), (long_tokens, long_scale)):if tokens and scale != 1.0:w = torch.where(torch.isin(x, torch.tensor(tokens, dtype=x.dtype, device=x.device)), w * scale, w)if token_scale is not None:w = w * token_scale.to(w.dtype).view_as(w)if pause_scale != 1.0 and pause_tokens:punct = torch.isin(x, torch.tensor(pause_tokens, dtype=x.dtype, device=x.device)) & ~stopw = torch.where(punct, w * pause_scale, w)28 unmodified linesdur = (torch.round(w).clamp_min(1) * x_mask).long()cond, pos, y_mask, y_lengths = self.expand(h_x, dur)no_pos = torch.zeros_like(pos) if pos is not None else Nonecond_hard = soft_mask = Noneif soft_guidance > 0 and soft_pairs:x_hard = x.clone()soft_tok = torch.zeros_like(x, dtype=torch.bool)for soft_id, hard_id in soft_pairs:hit = x == soft_idx_hard[hit], soft_tok = hard_id, soft_tok | hitif soft_tok.any():cond_hard = self.expand(self.encoder(x_hard, x_lengths, spk, ctx)[0], dur)[0]frames = torch.stack([F.pad(torch.repeat_interleave(soft_tok[b].float(), dur[b]),(0, cond.shape[1] - int(dur[b].sum())))for b in range(x.shape[0])])spread = F.max_pool1d(F.pad(frames[:, None], (soft_spread, 0)), soft_spread + 1, stride=1)[:, 0]soft_mask = (spread * y_mask)[..., None].to(cond.dtype)z = torch.randn(x.shape[0], cond.shape[1], self.n_feats, device=x.device, dtype=cond.dtype) * temperaturenoise = zts = torch.linspace(0, 1, n_timesteps + 1, device=x.device)ts = ts + sway * (torch.cos(math.pi / 2 * ts) - 1 + ts)for i in range(n_timesteps):t = ts[i].clamp_min(t_min).expand(x.shape[0])v = v_cond = self.decoder(z, cond, t, spk, y_mask, pos)if guidance > 0:v = v + guidance * (v - self.decoder(z, torch.zeros_like(cond), t, spk, y_mask, no_pos))if cond_hard is not None:v = v + soft_guidance * soft_mask * (v_cond - self.decoder(z, cond_hard, t, spk, y_mask, pos))z = z + (ts[i + 1] - ts[i]) * vmel = (z * self.mel_std + self.mel_mean) * y_mask[..., None]if eq_tokens and eq_gain is not None:40 unmodified linespitch of the recording (more so for a larger ``t_start``) but has the texture of generated mels, frame forframe aligned with the recorded audio: training data for a vocoder that will only ever see generated mels."""from .mas import maximum_path # numbaspk = self._speaker(spks, None, x.shape[0], x.device)h_x, mu_x, _, x_mask = self.encoder(x, x_lengths, spk)y = (y.transpose(1, 2) - self.mel_mean) / self.mel_std
123version https://git-lfs.github.com/spec/v1oid sha256:2e2ec097569a384f96632abd3f124938228fadcf3479b12c0c11939710549b15size 56162224123version https://git-lfs.github.com/spec/v1oid sha256:0e559e93410200d265005e489579008ca9d05ece6ed0d4696f921a5bb6b761absize 28880914123version https://git-lfs.github.com/spec/v1oid sha256:45a71f9f3cb3fb7e1ef3a3de9c67b09108e653aad8f6c926c7aca5fff79e29c5size 28880914
123version https://git-lfs.github.com/spec/v1oid sha256:5340414ca01b34dffa5a985d1a4121bfeb45cd84a0a0f3b28eca6eac7c826a71size 70259571123version https://git-lfs.github.com/spec/v1oid sha256:d4e84fa8edc5162519e05d43c8b23a36022f59f568e039b5e0bbfd961303bf32size 70259571
123version https://git-lfs.github.com/spec/v1oid sha256:cfdb578c34ac9cf800b6d932fb348ce001ca71043c081580864d5f94eaedc0c6size 13750842123version https://git-lfs.github.com/spec/v1oid sha256:9707f00634269e68d58bc200c5e0b78bb484fc257ecdafff7a38c0e375b205desize 13750842
1{"language": "sk", "vocoder": "bigvgan", "symbols": ["<pad>", "<bos>", "<eos>", "<unk>", "▁", ",", ".", "!", "?", "AA0", "AA1", "AA2", "AE0", "AE1", "AE2", "AH0", "AH1", "AH2", "AO0", "AO1", "AO2", "AW0", "AW1", "AW2", "AY0", "AY1", "AY2", "EH0", "EH1", "EH2", "ER0", "ER1", "ER2", "EY0", "EY1", "EY2", "IH0", "IH1", "IH2", "IY0", "IY1", "IY2", "OW0", "OW1", "OW2", "OY0", "OY1", "OY2", "UH0", "UH1", "UH2", "UW0", "UW1", "UW2", "B", "CH", "D", "DH", "F", "G", "HH", "JH", "K", "L", "M", "N", "NG", "P", "R", "S", "SH", "T", "TH", "V", "W", "Y", "Z", "ZH", "sk:<s>", "sk:<q>", "sk:<wh>", "sk:<e>", "sk:|1", "sk:|2", "sk:|3", "sk:|4", "sk:▁", "sk:ˈ", "sk:a", "sk:e", "sk:i", "sk:o", "sk:u", "sk:aː", "sk:eː", "sk:iː", "sk:oː", "sk:uː", "sk:ia", "sk:ie", "sk:iu", "sk:uo", "sk:r̩", "sk:r̩ː", "sk:l̩", "sk:l̩ː", "sk:p", "sk:b", "sk:t", "sk:d", "sk:c", "sk:ɟ", "sk:k", "sk:g", "sk:ts", "sk:dz", "sk:tʃ", "sk:dʒ", "sk:f", "sk:v", "sk:w", "sk:s", "sk:z", "sk:ʃ", "sk:ʒ", "sk:x", "sk:ɦ", "sk:m", "sk:n", "sk:ɲ", "sk:ŋ", "sk:l", "sk:ʎ", "sk:r", "sk:j"], "voices": {"sk_f3": [0.0069220950827002525, 0.025969285517930984, 0.08535561710596085, -0.09493527561426163, -0.14596465229988098, 0.00032224622555077076, 0.08764629811048508, -0.03438185155391693, 0.09686848521232605, 0.06196203455328941, 0.12122627347707748, -0.06127996742725372, 0.10377505421638489, -0.01582501083612442, 0.06028405576944351, 0.027843158692121506, -0.08210922032594681, 0.03653174638748169, -0.018876979127526283, 0.05382998287677765, -0.06425376236438751, 0.004607432056218386, 0.03896747902035713, -0.11966422200202942, 0.06343807280063629, -0.12184412032365799, -0.02126498892903328, 0.07495327293872833, 0.022044310346245766, -0.08201880753040314, 0.07486635446548462, -0.0819067656993866, 0.09514299035072327, -0.061507850885391235, 0.02417520247399807, 0.002311374293640256, -0.09207151085138321, 0.007653384003788233, -0.15520614385604858, -0.1480940878391266, 0.002546643139794469, -0.009824864566326141, -0.1772390902042389, 0.026085006073117256, 0.026416392996907234, -0.013845834881067276, 0.054473839700222015, -0.0779697373509407, -0.0978066474199295, -0.0837216004729271, -0.017712270841002464, 0.023772289976477623, -0.0055798315443098545, 0.06802446395158768, 0.022231435403227806, -0.07259859889745712, -0.03732074797153473, -0.08997371792793274, -0.03945454582571983, 0.10520587116479874, 0.1145419329404831, -0.048494163900613785, 0.03043532371520996, -0.06480081379413605, -0.08295542001724243, 0.05099185183644295, 0.0916825607419014, 0.09053876250982285, -0.03743071109056473, 0.08533451706171036, 0.12690933048725128, -0.007914270274341106, -0.06867715716362, -0.07989329844713211, 0.029588399454951286, -0.043726690113544464, 0.08121353387832642, 0.062097661197185516, -0.09368886798620224, -0.10700567066669464, -0.04510211572051048, -0.052244316786527634, -0.09686923027038574, 0.07206062972545624, -0.021960511803627014, 0.17842909693717957, -0.12118241935968399, 0.0341760478913784, 0.12143102288246155, -0.024871744215488434, -0.015425002202391624, -0.058072056621313095, -0.07772723585367203, -0.03486534208059311, 0.017253687605261803, 0.030715281143784523, -0.00817838218063116, 0.03271663933992386, 0.07943491637706757, 0.04381219670176506, -0.0075861369259655476, -0.030322184786200523, -0.05918130278587341, 0.034897010773420334, -0.06694208830595016, 0.022675972431898117, -0.1466275155544281, 0.04075567424297333, -0.0462232306599617, 0.12151164561510086, 0.15512670576572418, 0.1148054450750351, 0.003235230688005686, -0.10640178620815277, 0.06144479662179947, 0.0031708208844065666, -0.04580552130937576, 0.026719121262431145, -0.08421687036752701, 0.06003719940781593, -0.07768043130636215, -0.028076047077775, 0.09770499169826508, 0.06046808883547783, -0.11217805743217468, -0.0842382088303566, -0.10238291323184967, -0.07293198257684708, 0.08308366686105728, -0.07062023878097534, 0.09781237691640854, 0.059962738305330276, 0.07842554152011871, 0.024967463687062263, 0.03208184614777565, 0.08186769485473633, -0.038767892867326736, -0.05660480633378029, -0.13511717319488525, -0.02679261937737465, -0.059443678706884384, -0.012461567297577858, 0.03912317752838135, -0.050175223499536514, 0.06664767116308212, 0.03994154557585716, 0.058831747621297836, 0.014645740389823914, 0.03166384994983673, 0.11226306855678558, 0.03234376758337021, 0.05169070512056351, 0.0733196884393692, -0.052095700055360794, 0.03154715895652771, 0.08816029131412506, 0.021930737420916557, 0.059319522231817245, 0.021856624633073807, -0.0697982907295227, 0.0827752947807312, -0.016794124618172646, 0.1373288333415985, 0.047362037003040314, 0.10703173279762268, 0.10932779312133789, 0.0390084944665432, -0.04382721334695816, 0.03785355016589165, 0.08803846687078476, -0.051568321883678436, 0.11728514730930328, -0.07688966393470764, -0.03130396082997322, -0.025611117482185364, -0.004799845162779093, -0.0206914059817791, 0.06866998970508575, 0.025913121178746223, 0.02568175457417965, 0.025991586968302727, -0.010967152193188667, -0.0034555925521999598, 0.07785943895578384, 0.022330626845359802, 0.005075695924460888, 0.103604756295681, -0.13793043792247772, 0.06114722043275833, 0.06387419253587723, -0.08323141932487488, 0.0440208837389946, -0.05241548642516136, -0.01854764111340046, -0.07451599091291428, -0.016836775466799736, 0.012907693162560463, -0.10157483071088791, 0.09838944673538208, 0.03780096024274826, -0.044474583119153976, 0.006056552287191153, -0.025014474987983704, -0.1231941357254982, 0.10177677869796753, 0.08554479479789734, 0.01990067958831787, -0.03043481521308422, -0.05259972810745239, -0.048060495406389236, 0.10816875100135803, 0.03521691635251045, -0.002017595339566469, 0.024097785353660583, 0.07850710302591324, 0.1226380467414856, -0.09665429592132568, -0.09156115353107452, 0.016159996390342712, -0.12041638046503067, 0.08137863129377365, 0.09571825712919235, -0.07472876459360123, -0.0928075909614563, 0.08536958694458008, -0.07941228896379471, 0.06431327760219574, -0.07708175480365753, -0.14428292214870453, 0.01991124451160431, -0.04411928355693817, 0.0230460986495018, -0.0853683352470398, 0.04575435817241669, 0.04512261226773262, -0.1003434807062149, 0.09046773612499237, -0.04525180533528328, 0.0271983053535223, -0.01599619910120964, -0.12744814157485962, -0.043206531554460526, 0.0386822409927845, 0.03523113951086998, 0.013651641085743904, -0.0555524043738842, -0.11787251383066177, 0.0008374134195037186, -0.12753580510616302, 0.04498244822025299, -0.0733710452914238, -0.012414051219820976, 0.053098078817129135, 0.09323238581418991, -0.005115098785609007, 0.0914095938205719], "sk_f2": [0.024097561836242676, 0.030168669298291206, 0.043650928884744644, -0.027951136231422424, -0.07817357778549194, -0.005449120420962572, 0.05257202684879303, -0.045568615198135376, 0.0738847404718399, -0.02667238935828209, 0.04473037272691727, -0.009615535847842693, 0.0383019745349884, -0.0027216521557420492, 0.03313062712550163, -0.01756933145225048, -0.05668586120009422, 0.01242008339613676, 0.030627205967903137, 0.00429007550701499, -0.036590512841939926, 0.023337097838521004, 0.014491959474980831, -0.06983091682195663, 0.03388449549674988, -0.09208258986473083, -0.008395465090870857, 0.0684259906411171, 0.03183995559811592, -0.05619150400161743, -0.002181802410632372, -0.041507985442876816, 0.04100802168250084, -0.019180219620466232, 0.0207273717969656, 0.07022634893655777, -0.07003574073314667, -0.0462697297334671, -0.09469541907310486, -0.10863298922777176, -0.016562674194574356, 0.019701670855283737, -0.12199992686510086, 0.008158247917890549, -0.023660710081458092, -0.017495064064860344, 0.034658126533031464, -0.023781631141901016, -0.04877622798085213, -0.026612434536218643, 0.012298217043280602, -0.02441677451133728, 0.048689790070056915, -0.0058479392901062965, -0.04646887630224228, -0.040177006274461746, -0.03928855434060097, -0.00804735068231821, -0.06016168370842934, 0.0495726615190506, 0.04329775273799896, -0.0120718814432621, -0.027341952547430992, -0.008509863168001175, -0.034739404916763306, -0.019885430112481117, 0.04748579114675522, 0.060399141162633896, 0.03364885598421097, 0.04357143118977547, 0.09640394151210785, -0.004484984558075666, -0.032641321420669556, -0.010708846151828766, 0.014448054134845734, -0.03689482808113098, 0.02170329913496971, -0.014699080027639866, -0.04527376592159271, -0.04999920353293419, -0.02163383550941944, -0.025249382480978966, -0.08334973454475403, 0.01766347698867321, -0.03356679528951645, 0.14948655664920807, -0.03974779322743416, 0.035962022840976715, 0.07903093844652176, -0.05388018116354942, -0.008143189363181591, -0.03537096455693245, -0.01526119839400053, -0.024802232161164284, -0.0021449504420161247, 0.09032466262578964, 0.06179432570934296, 0.001414844999089837, 0.05074925720691681, -0.008059952408075333, -0.006018988788127899, -0.007039212621748447, 0.01743687130510807, -0.014672081917524338, -0.049365509301424026, 0.039760954678058624, -0.09551216661930084, -0.03767023980617523, -0.010618026368319988, 0.09264171123504639, 0.11118534952402115, 0.10678435117006302, 0.049383897334337234, -0.052618350833654404, 0.011095641180872917, -0.03801474720239639, -0.025791538879275322, 0.03572089225053787, 0.005060484632849693, 0.0027973472606390715, -0.05591229721903801, -0.016014473512768745, 0.040837861597537994, 0.055352430790662766, -0.06306610256433487, -0.03682548925280571, -0.03343666344881058, -0.03121863305568695, 0.03609577193856239, -0.0048875049687922, 0.05425698682665825, 0.05175263062119484, 0.034288689494132996, 0.06929577887058258, 0.004533826373517513, 0.017628263682127, 0.014835023321211338, -0.04960944876074791, -0.12282758951187134, 0.010756325908005238, -0.008512694388628006, 0.013570980168879032, 0.00494487676769495, -0.035868700593709946, 0.020549559965729713, -0.0060182493180036545, 0.002885116497054696, -0.0206423532217741, -0.004758887924253941, 0.06703010201454163, 0.023000327870249748, 0.0552949421107769, 0.006436473224312067, -0.05298313871026039, -0.017114970833063126, 0.06149057298898697, 0.0024807883892208338, -0.008851351216435432, 0.036341115832328796, -0.04187731817364693, 0.05857101455330849, -0.009575247764587402, 0.06979426741600037, 0.04412073642015457, 0.053835079073905945, 0.05447831749916077, 0.06466595828533173, 0.001393102458678186, 0.03768660128116608, 0.0497903935611248, -0.06561547517776489, 0.10653814673423767, -0.01632833667099476, -0.056834906339645386, 0.023267190903425217, -0.020999951288104057, 0.014423804357647896, 0.029890552163124084, 0.05836153402924538, -0.0363486222922802, -0.02021036110818386, 0.035614073276519775, 0.020065926015377045, 0.0402769036591053, 0.01385585404932499, 0.057882703840732574, 0.050061605870723724, -0.09888768941164017, 0.019632741808891296, 0.010783595964312553, -0.04448627680540085, -0.01927703619003296, -0.030326789245009422, 0.01217689923942089, -0.032602980732917786, -0.013396689668297768, -0.03419116884469986, -0.04791100695729256, 0.058380283415317535, -0.0239116083830595, -0.03705713897943497, -0.0017270477255806327, -0.061741795390844345, -0.06591153889894485, 0.06776439398527145, 0.011767944321036339, 0.025723110884428024, 0.0013535335892811418, -0.05649380385875702, 0.008991016075015068, 0.11289903521537781, 0.022137749940156937, -0.04243382439017296, -0.012099899351596832, 0.03529380261898041, 0.04291291534900665, -0.012041104957461357, -0.03380099684000015, 0.028327303007245064, -0.0565875843167305, 0.020075833424925804, 0.03536389023065567, -0.02333691716194153, -0.10384808480739594, 0.04787662625312805, -0.029503753408789635, 0.0301466453820467, -0.02378085069358349, -0.07087701559066772, -0.02837279625236988, 0.03160630911588669, -0.019020047038793564, -0.0654759332537651, -0.011184139177203178, 0.06354306638240814, -0.043409351259469986, 0.05378085747361183, -0.015591144561767578, 0.046996790915727615, -0.03613948076963425, -0.09587481617927551, -0.05033108964562416, 0.03762822970747948, 0.004437517374753952, -0.030090471729636192, 0.022450359538197517, -0.09572584182024002, -0.01724437065422535, -0.07913604378700256, 0.03368911147117615, -0.03670649603009224, -0.029693806543946266, -0.012964166700839996, 0.034330278635025024, -0.012777972966432571, 0.04804672673344612], "sk_m1": [-0.6594359874725342, -0.8590675592422485, -0.3340880870819092, -0.4216928482055664, -0.4292481541633606, 0.561245858669281, -0.039768535643815994, -0.20545461773872375, -0.9284155964851379, 0.483791321516037, -0.10321065038442612, -0.3578355014324188, -0.37743765115737915, 0.34199556708335876, -0.058229461312294006, -0.5965105295181274, -1.071380615234375, -0.9979472160339355, -0.338621586561203, -0.7843340039253235, 0.45100098848342896, -0.44724756479263306, 0.6141610741615295, 0.5597532987594604, -0.005405937787145376, -0.7225935459136963, 0.04538361355662346, -0.1388455629348755, -0.1515306532382965, 0.8850967288017273, -0.2957577109336853, 0.6978495717048645, 1.1830191612243652, 0.12686192989349365, -0.9305142760276794, -0.15785901248455048, 0.7685427069664001, 0.41990283131599426, -0.828966498374939, 0.3956412076950073, 0.269621878862381, -0.12421183288097382, -0.26868411898612976, -0.4826836884021759, -0.33832335472106934, -0.3880341351032257, 0.45399555563926697, 0.09130784869194031, 0.00019212972256354988, -1.3175843954086304, -0.9867952466011047, 0.1939685046672821, 0.3604903519153595, -0.32406437397003174, 0.29462534189224243, 0.367031067609787, -0.48818376660346985, 0.4234353303909302, 0.9175636172294617, 1.0814405679702759, 0.8130167722702026, 0.4963688552379608, -0.16454117000102997, 0.418791264295578, -0.18220359086990356, -0.7526606917381287, -0.21244041621685028, 0.3942188024520874, 0.038714297115802765, -0.23450683057308197, 1.3822678327560425, 0.38818857073783875, -0.5134894847869873, -0.6253427863121033, 0.630483090877533, 0.4273097515106201, -0.584699809551239, 0.42638710141181946, -0.4047740399837494, 0.2640407383441925, -0.0010079138446599245, -0.9372542500495911, -0.6283785700798035, 0.16921688616275787, -0.07024975121021271, 0.17044329643249512, -0.11768178641796112, 0.48079028725624084, -0.1153411790728569, 0.07285873591899872, -0.7333114147186279, 0.13695073127746582, -0.23452982306480408, -0.47011855244636536, 0.8837440013885498, 0.35419970750808716, -0.5191027522087097, 0.3435491621494293, -0.048973239958286285, -0.44073987007141113, -0.15618360042572021, -0.3343803882598877, -0.5010102987289429, -0.3668557107448578, 0.7347089648246765, -0.49756771326065063, -0.11815501004457474, 0.11792640388011932, -0.5298041105270386, 0.10647834092378616, -0.343199759721756, 0.14111639559268951, 0.33461794257164, 0.20267637073993683, 0.5916112661361694, -0.44652387499809265, 0.8188480138778687, -0.7516932487487793, -0.12890860438346863, -0.9457066059112549, 0.38750073313713074, 0.000907783629372716, 0.08444958925247192, -0.1295805126428604, 0.20477737486362457, 0.1588626503944397, -0.27976375818252563, -0.18955564498901367, 0.8502081036567688, 0.5553237199783325, 0.2922928035259247, 0.9646939039230347, 0.18258938193321228, 0.15660107135772705, 0.5594731569290161, 0.02666294388473034, 0.8473917245864868, -0.49906715750694275, 0.1970818191766739, -0.08225897699594498, 0.868649423122406, 0.582898736000061, -0.5011805891990662, -0.5194291472434998, 0.17157600820064545, -0.029250143095850945, 0.20678633451461792, 0.3596228361129761, -0.19917751848697662, -0.4170529842376709, 0.33080706000328064, 0.3589215576648712, 0.7303389310836792, -0.4868207573890686, 0.15980181097984314, 0.0011628622887656093, -0.6348559260368347, -0.619333028793335, -0.3582775294780731, -0.01990852691233158, -0.25675466656684875, -0.2944406569004059, -0.6637600660324097, -0.584166944026947, -0.46662166714668274, -0.132478728890419, 0.3964209258556366, -0.30076107382774353, 0.10123525559902191, -0.8328986763954163, 0.9588265419006348, 0.21397049725055695, -0.5614163279533386, 0.2203303724527359, 0.09515456110239029, -0.23302061855793, -0.2981974482536316, -0.2324647754430771, -0.1621292382478714, 0.268691748380661, 0.7389184832572937, 0.4840203821659088, 0.6937673687934875, -0.4113222360610962, 0.6561809182167053, -1.2155946493148804, 0.8793654441833496, 0.35360175371170044, -0.436225026845932, -0.556606650352478, -0.4510931968688965, -0.5128986239433289, -0.21721333265304565, -0.7819942235946655, 0.4346346855163574, -0.4476339519023895, -0.5610625743865967, 0.14093586802482605, 0.8294968605041504, 0.1518557071685791, 0.07351728528738022, -0.03982733562588692, -0.36518386006355286, 0.06151654198765755, -0.7278828620910645, 0.2685856223106384, -0.534945011138916, 1.069612979888916, 0.7044892311096191, -0.679125964641571, -0.6881814002990723, -0.28567633032798767, -0.6514680981636047, 0.9735426306724548, -0.891938328742981, 0.4702104926109314, -0.274715393781662, -0.27546995878219604, 0.7771115899085999, -0.2808266580104828, -0.37654513120651245, -0.2170010805130005, 0.5293588638305664, -0.03979289531707764, -0.4564104378223419, -1.1188852787017822, 0.08321906626224518, 0.7889278531074524, -0.08276275545358658, -0.08456353843212128, 0.037263236939907074, 0.18487927317619324, 0.039911288768053055, -0.588462233543396, -0.11964796483516693, -1.5144703388214111, -0.9792431592941284, 0.4126518666744232, -0.6432049870491028, 0.6586396098136902, -0.27811792492866516, 0.04909246414899826, 0.6623432040214539, -0.24891167879104614, 0.23794648051261902, -0.8212035298347473, -0.7160554528236389, 0.4204083979129791, 0.08378566056489944, -0.17133833467960358, -0.5402119159698486, -0.6000930666923523, 0.9218289852142334, -0.40126389265060425, 0.1807071715593338, -0.05342463031411171]}, "delivery": {"guidance": 1.5, "length_scale": 1.04, "pause_scale": 1.0, "max_pause": 18, "max_final": 1.25, "short_scale": 0.85, "long_scale": 1.12, "min_vowel": 6, "min_phone": 3, "max_tail": 8, "max_stop": 42, "n_timesteps": 10, "temperature": 0.667, "sentence_gap": 0.35}, "mel_mean": -5.934409141540527, "mel_std": 2.369523763656616, "pause_tokens": [5, 6, 7, 8, 83, 84, 85], "stop_tokens": [6, 7, 8, 84, 85], "token_sets": {"vowel": [88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105], "short": [88, 89, 90, 91, 92], "long": [93, 94, 95, 96, 97, 98, 99, 100, 101], "phone": [88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134], "lead": [1, 78, 79, 80, 81, 87], "tail": [2], "eq": [114, 115, 121, 122]}, "eq_gain": [0.005094512977431282, 0.010337334883303817, 0.01573278321339248, 0.02128530115226229, 0.026999461232257754, 0.032879969099011246, 0.03893166738657084, 0.04515953970533884, 0.051568714746105394, 0.0581644705035566, 0.06495223862273523, 0.07193760887203357, 0.07912633374640173, 0.08652433320456218, 0.09413769954413191, 0.10197270241866667, 0.1100357940007587, 0.11833361429544038, 0.12687299660826865, 0.13566097317259376, 0.1447047809406464, 0.1540118675432118, 0.1635898974227992, 0.17344675814535673, 0.18359056689573044, 0.1940296771622146, 0.20477268561570136, 0.21582843918909062, 0.22720604236279368, 0.23891486466232814, 0.2509645483741792, 0.2633650164862816, 0.27612648085966, 0.2892594506379597, 0.3027747409017895, 0.31668348157500686, 0.3309971265902782, 0.3457274633214616, 0.3608866222905818, 0.3764870871573887, 0.3925417049997264, 0.40906369689318106, 0.4260666687987172, 0.4435646227672683, 0.4615719684705124, 0.48010353506732384, 0.49917458341567583, 0.498119918135995, 0.4961001596935298, 0.4940216030476564, 0.49188253649431607, 0.4896811984991724, 0.4874157762469774, 0.48508440414870724, 0.48268516230523784, 0.48021607492629675, 0.4776751087033875, 0.4750601711353478, 0.4723691088051621, 0.46959970560660946, 0.46674968091928676, 0.4638166877305037, 0.4607983107025037, 0.45769206418341835, 0.45449539016031826, 0.4512056561526736, 0.447275191305613, 0.4429201160666713, 0.43843825804302977, 0.4338259263973056, 0.4290793228462938, 0.4241945385330571, 0.419167550807959, 0.41399421991598717, 0.40867028558764007, 0.4031913635305685, 0.2982023796739416, 0.05681569062831121, -0.19159812767401585, -0.44724364552556906, -0.7103313885675037, -0.9022274178889768, -0.909882046010775, -0.9177595118600242, -0.9258663025778351, -0.9342090941557443, -0.9427947569334342, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95], "eq_voices": ["sk_f2", "sk_m1"], "dur_temperature": 0.7, "sway": -1.0, "sample_rate": 24000, "hop": 256, "source": {"checkpoint": "run_f4_best.pt", "step": 4000}}1{"language": "sk", "vocoder": "bigvgan", "symbols": ["<pad>", "<bos>", "<eos>", "<unk>", "▁", ",", ".", "!", "?", "AA0", "AA1", "AA2", "AE0", "AE1", "AE2", "AH0", "AH1", "AH2", "AO0", "AO1", "AO2", "AW0", "AW1", "AW2", "AY0", "AY1", "AY2", "EH0", "EH1", "EH2", "ER0", "ER1", "ER2", "EY0", "EY1", "EY2", "IH0", "IH1", "IH2", "IY0", "IY1", "IY2", "OW0", "OW1", "OW2", "OY0", "OY1", "OY2", "UH0", "UH1", "UH2", "UW0", "UW1", "UW2", "B", "CH", "D", "DH", "F", "G", "HH", "JH", "K", "L", "M", "N", "NG", "P", "R", "S", "SH", "T", "TH", "V", "W", "Y", "Z", "ZH", "sk:<s>", "sk:<q>", "sk:<wh>", "sk:<e>", "sk:|1", "sk:|2", "sk:|3", "sk:|4", "sk:▁", "sk:ˈ", "sk:a", "sk:e", "sk:i", "sk:o", "sk:u", "sk:aː", "sk:eː", "sk:iː", "sk:oː", "sk:uː", "sk:ia", "sk:ie", "sk:iu", "sk:uo", "sk:r̩", "sk:r̩ː", "sk:l̩", "sk:l̩ː", "sk:p", "sk:b", "sk:t", "sk:d", "sk:c", "sk:ɟ", "sk:k", "sk:g", "sk:ts", "sk:dz", "sk:tʃ", "sk:dʒ", "sk:f", "sk:v", "sk:w", "sk:s", "sk:z", "sk:ʃ", "sk:ʒ", "sk:x", "sk:ɦ", "sk:m", "sk:n", "sk:ɲ", "sk:ŋ", "sk:l", "sk:ʎ", "sk:r", "sk:j"], "voices": {"sk_a": [0.02586555667221546, 0.07067811489105225, 0.00721680698916316, -0.0005138097330927849, -0.0505928099155426, -0.027729196473956108, 0.04336109757423401, -0.06487513333559036, 0.042812664061784744, -0.0675918459892273, 0.021223140880465508, -0.0381060428917408, 0.041413791477680206, 0.01605728082358837, 0.004052224103361368, -0.0540861077606678, -0.00699626374989748, -0.008672292344272137, 0.02788134478032589, -0.03195085749030113, -0.0222578477114439, 0.008119569160044193, -0.01818683370947838, -0.037645719945430756, 0.056004367768764496, -0.06227811425924301, 0.03764474764466286, 0.05354286730289459, 0.010299148969352245, -0.06325062364339828, -0.04132012277841568, -0.002070717979222536, 0.0008054304635152221, 0.01723589561879635, 0.031555239111185074, 0.07976315170526505, -0.03765350207686424, -0.04062763601541519, -0.09553376585245132, -0.047034263610839844, 0.015067944303154945, 0.04898519441485405, -0.12222615629434586, -0.019159384071826935, -0.04349870979785919, -0.024907130748033524, 0.00985740590840578, 0.015456199645996094, -0.009726259857416153, -0.03074653446674347, 0.011743246577680111, -0.059106893837451935, 0.06422358751296997, -0.04011647030711174, -0.06699148565530777, -0.04652813822031021, -0.051071733236312866, 0.0007646749727427959, -0.02872166968882084, 0.04735175147652626, 0.04548732563853264, 0.019661780446767807, -0.06561756134033203, 0.017703501507639885, -0.020306387916207314, -0.056603435426950455, 0.04477745667099953, 0.019337667152285576, 0.08321693539619446, 0.022230299189686775, 0.11379921436309814, 0.012357348576188087, 0.013766364194452763, -0.026499856263399124, -0.02438511699438095, -0.011130579747259617, 0.005004493054002523, -0.055965766310691833, -0.040961891412734985, -0.02142120897769928, 0.006854777690023184, 0.009896967560052872, -0.04466527700424194, -0.01909138448536396, -0.04945603013038635, 0.11050400882959366, -0.0005985083407722414, -0.016613861545920372, 0.06406086683273315, -0.04822751507163048, 0.020179057493805885, -0.035872478038072586, -0.004583931528031826, -0.032162148505449295, -0.037699975073337555, 0.13079573214054108, 0.11059805750846863, 0.004586806986480951, 0.06294117122888565, -0.008188636042177677, -0.03159892186522484, 0.008777448907494545, 0.007397997658699751, -0.0138501962646842, -0.026034623384475708, 0.06863182783126831, -0.0977359265089035, -0.010583870112895966, -0.0011743823997676373, 0.047838807106018066, 0.09753931313753128, 0.06340797245502472, 0.08789756894111633, -0.019083471968770027, 0.0010063669178634882, -0.09213188290596008, 0.0005628293147310615, 0.03248618543148041, 0.0366801843047142, -0.0028149622958153486, -0.017525536939501762, -0.007906881161034107, 0.030271604657173157, 0.021939566358923912, -0.015565674751996994, -0.039904799312353134, 0.012905185110867023, 0.0018292792374268174, -0.0018584654899314046, 0.03628068417310715, 0.012515641748905182, 0.07186781615018845, 0.029341597110033035, 0.09589703381061554, -0.023885926231741905, -0.020107777789235115, 0.008300595916807652, -0.06397669017314911, -0.13044984638690948, 0.021410776302218437, 0.0012370001059025526, 0.029347693547606468, -0.022005554288625717, -0.05519799888134003, -0.003267307998612523, -0.021230805665254593, -0.028208957985043526, -0.011402003467082977, -0.022065624594688416, 0.06724775582551956, 0.05253812298178673, 0.044626373797655106, -0.011547706089913845, -0.01276419311761856, -0.0341745987534523, 0.0693473070859909, -0.010981693863868713, 0.008938532322645187, 0.03840634599328041, -0.009350361302495003, 0.022076651453971863, 0.0014656875282526016, 0.04133458063006401, 0.0034553511068224907, 0.06017349660396576, 0.07234171777963638, 0.09707874804735184, 0.005296087358146906, 0.007763149216771126, 0.03296499326825142, -0.04122399538755417, 0.08605370670557022, 0.024814140051603317, -0.05322490260004997, 0.01393392775207758, -0.021952375769615173, 0.03595740720629692, 0.009278031066060066, 0.0597865954041481, -0.06467318534851074, -0.04892554134130478, 0.06886380165815353, 0.004473118111491203, -0.005063739605247974, -0.018995579332113266, 0.049073636531829834, 0.04857609048485756, -0.10834280401468277, -0.0014722238993272185, 0.0070938412100076675, -0.05391008034348488, -0.06000712886452675, -0.06570348888635635, -0.003561902791261673, -0.00834750384092331, -0.05466587096452713, -0.06573092937469482, 0.005380062386393547, 0.0183878131210804, -0.0638522282242775, -0.037331197410821915, -0.02394208312034607, -0.09906121343374252, -0.021816395223140717, 0.03527034446597099, 0.039950836449861526, 0.0532170832157135, -0.019039155915379524, -0.014788411557674408, 0.07665250450372696, 0.09875854849815369, 0.0625128373503685, -0.07896898686885834, -0.04603511840105057, 0.02909747138619423, 0.01448748167604208, 0.02693031169474125, 0.0020951698534190655, 0.006861577276140451, -0.018126800656318665, 0.008474007248878479, 0.016054876148700714, -0.018601492047309875, -0.1461615264415741, 0.010414663702249527, 0.008636074140667915, 0.036439307034015656, 0.004688520450145006, -0.06378240138292313, -0.05083531513810158, 0.07547648251056671, -0.048797789961099625, -0.037393033504486084, -0.019865961745381355, 0.02649928815662861, 0.0014964938163757324, 0.04884173348546028, 0.009852645918726921, 0.016884014010429382, -0.08248943090438843, -0.06170445308089256, -0.08003274351358414, -0.006813704967498779, -0.02843317948281765, -0.013924681581556797, 0.0308537557721138, -0.062362950295209885, -0.03161146119236946, -0.028102844953536987, -0.009601008147001266, -0.008435043506324291, -0.04035476967692375, -0.015081170946359634, -0.007420688401907682, -0.02363641932606697, 0.007787893060594797]}, "delivery": {"guidance": 1.5, "length_scale": 1.04, "pause_scale": 1.0, "max_pause": 18, "max_final": null, "short_scale": 1.0, "long_scale": 1.0, "min_vowel": 0.0, "min_phone": 0.0, "max_tail": 8, "max_stop": 42, "n_timesteps": 10, "temperature": 0.667, "sentence_gap": 0.35}, "mel_mean": -5.934409141540527, "mel_std": 2.369523763656616, "pause_tokens": [5, 6, 7, 8, 83, 84, 85], "stop_tokens": [6, 7, 8, 84, 85], "token_sets": {"vowel": [88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105], "short": [88, 89, 90, 91, 92], "long": [93, 94, 95, 96, 97, 98, 99, 100, 101], "phone": [88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134], "lead": [1, 78, 79, 80, 81, 87], "tail": [2], "eq": [114, 115, 121, 122]}, "eq_gain": [0.005094512977431282, 0.010337334883303817, 0.01573278321339248, 0.02128530115226229, 0.026999461232257754, 0.032879969099011246, 0.03893166738657084, 0.04515953970533884, 0.051568714746105394, 0.0581644705035566, 0.06495223862273523, 0.07193760887203357, 0.07912633374640173, 0.08652433320456218, 0.09413769954413191, 0.10197270241866667, 0.1100357940007587, 0.11833361429544038, 0.12687299660826865, 0.13566097317259376, 0.1447047809406464, 0.1540118675432118, 0.1635898974227992, 0.17344675814535673, 0.18359056689573044, 0.1940296771622146, 0.20477268561570136, 0.21582843918909062, 0.22720604236279368, 0.23891486466232814, 0.2509645483741792, 0.2633650164862816, 0.27612648085966, 0.2892594506379597, 0.3027747409017895, 0.31668348157500686, 0.3309971265902782, 0.3457274633214616, 0.3608866222905818, 0.3764870871573887, 0.3925417049997264, 0.40906369689318106, 0.4260666687987172, 0.4435646227672683, 0.4615719684705124, 0.48010353506732384, 0.49917458341567583, 0.498119918135995, 0.4961001596935298, 0.4940216030476564, 0.49188253649431607, 0.4896811984991724, 0.4874157762469774, 0.48508440414870724, 0.48268516230523784, 0.48021607492629675, 0.4776751087033875, 0.4750601711353478, 0.4723691088051621, 0.46959970560660946, 0.46674968091928676, 0.4638166877305037, 0.4607983107025037, 0.45769206418341835, 0.45449539016031826, 0.4512056561526736, 0.447275191305613, 0.4429201160666713, 0.43843825804302977, 0.4338259263973056, 0.4290793228462938, 0.4241945385330571, 0.419167550807959, 0.41399421991598717, 0.40867028558764007, 0.4031913635305685, 0.2982023796739416, 0.05681569062831121, -0.19159812767401585, -0.44724364552556906, -0.7103313885675037, -0.9022274178889768, -0.909882046010775, -0.9177595118600242, -0.9258663025778351, -0.9342090941557443, -0.9427947569334342, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95, -0.95], "eq_voices": [], "dur_temperature": 0.7, "sway": -1.0, "sample_rate": 24000, "hop": 256, "source": {"voice": "sk_a: a Slovak Common Voice speaker (CV22, CC0), run_cv2 step 3000", "vocoder": "BigVGAN base 24 kHz fine-tuned on this voice (voc_cva step 4000)", "delivery": "own timing (cva_dur.py, lab15)", "soft_glide": "j at 0.7 length after ť ď ň before e/é only (cva_jglide.py e07, lab18; CER 1.16 vs 1.11 %)"}, "soft_glide": {"after": ["c", "ɟ", "ɲ"], "before": {"e": 0.7, "eː": 0.7}, "insert": "j"}}
README.md+41-36
config.json+205-198
model.safetensors+2-2
tts_slovak/__init__.py+100-45
tts_slovak/__main__.py+4-4
tts_slovak/frontend/data/foreign.tsvAdded+547
tts_slovak/frontend/data/g2p_hard.txt+333
tts_slovak/frontend/g2p.py+80-7
tts_slovak/frontend/pipeline.py+3-2
tts_slovak/model.py+27-5
vocoder.safetensorsAdded+3
web/bigvgan.onnx+1-1
web/decoder.onnx+1-1
web/text.onnx+1-1
web/voices.json+1-1