TS Silero Stress
The Russian text fixer that stops TTS from saying the wrong word
- text
Russian is a language where the pronunciation lives in the stress marks - and those aren't written down. за́мок is a castle, замо́к is a lock, and a text-to-speech engine that guesses wrong will happily read you the wrong word. TS Silero Stress is a one-input text preprocessor that fixes this: it places stress marks and restores ё (which Russian writing also mostly drops) so the TTS downstream pronounces things right. If you've ever had a Russian voiceover stumble over an ordinary sentence, this is the node that was missing.
How it works
It wraps the silero-stress library, which is actually two independent passes you can toggle:
use_accentor- a rule-based accentor that handles stress andёplacement for ordinary, non-homograph words.use_homosolver- a neural disambiguation model for homographs, the words where stress actually changes meaning (that castle/lock problem). This is the expensive, smart pass.
Each pass has its own put_stress / put_yo pair, so you can, say, restore ё but skip stress marks, or fix only the homographs. stress_single_vowel (on) even marks single-vowel words, which is pedantic but occasionally exactly what an educational worksheet wants. words_to_ignore takes a comma/newline list to skip completely - proper nouns you don't want mangled.
The inputs that matter
text- your Russian text. That's the one you'll actually type.run_device-cpuby default, which is right: this is a small model and CPU is instant. No need to burn GPU on it.stress_marker- the output format:unicode(Unicode combining acute accents, the default, which renders cleanly anywhere) or Silero'splussign notation. Pickunicodeunless you're feeding it to something that specifically expects+.- The
put_*/use_*toggles above.
The single output is text - your input with stress marks and ё restored, ready to paste into TS Silero TTS, an SSML block, or a document.
Install
silero-stress is an optional dependency, deliberately outside the core requirements (the Silero packages can conflict with your ComfyUI torch version).
cd ComfyUI/custom_nodes
git clone https://github.com/AlexYez/comfyui-timesaver
cd comfyui-timesaver
python -m pip install -r requirements.txt
python -m pip install silero-stress
Weights land in models/silero-stress/ on first use. Skip the install and the node tells you what's missing from the startup log's optional-imports report.
Common issues
- "It left my homographs alone." That's
use_homosolverbeing off, or the homosolver genuinely can't tell from context (it happens with truly ambiguous sentences). Check the toggle first. - "Output looks like
za\\u0301mokgarbage in my editor." Those are combining acute accents - theunicodemarker. If your downstream tool doesn't render them, switchstress_markertoplus, or use the output only as a pronunciation hint for the TTS (which reads them fine). - "It marked my brand name." Add it to
words_to_ignore.
The honest scope: this is a preprocessor, not a TTS - it produces text, not sound. Chain it in front of TS Silero TTS and you get the full pipeline: correct Russian, pronounced correctly, on your machine, for free.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Russian text for automatic stress and yo restoration. | |
| run_device | COMBO | cpu | Execution device for silero-stress. |
| stress_marker | COMBO | unicode | Stress mark output format: Unicode combining acute or native Silero plus sign. |
| use_accentor | BOOLEAN | true | Run the common accentor for non-homograph stress and yo placement. |
| use_homosolver | BOOLEAN | true | Run the homograph disambiguation model. |
| put_stress | BOOLEAN | true | Place stress marks in non-homograph words. |
| put_yo | BOOLEAN | true | Restore letter yo in non-homograph words where needed. |
| put_stress_homo | BOOLEAN | true | Place stress marks in homographs. |
| put_yo_homo | BOOLEAN | true | Restore letter yo in homographs where needed. |
| stress_single_vowel | BOOLEAN | true | Place stress marks even in words with a single vowel. |
| words_to_ignore | STRING | Comma or newline separated words that should be skipped completely. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | Input text with stress marks and yo restored. |