Silero Stress
Silero Stress — pre-trained enterprise-grade automated stress and homograph disambiguation for the Russian language.
For 19 other languages please refer here.
Fast start
Dependencies
System requirements to run python examples on x86-64 systems:
python 3.10+;- 1G+ RAM;
- A modern CPU with AVX, AVX2, AVX-512 or AMX instruction sets.
Dependencies:
torch>=1.12.0;
Using pip:
pip install silero-stress
from silero_stress import load_accentor
accentor = load_accentor()
sample_sent = "Меня зовут Лева Королев. Я из готов. И я уже готов открыть все ваши замки любой сложности!"
print(accentor(sample_sent))
# Мен+я зов+ут Л+ёва Корол+ёв. +Я +из г+отов. +И +я уж+е гот+ов откр+ыть вс+е в+аши замк+и люб+ой сл+ожности!
Using torch.hub:
import torch
torch.set_num_threads(1)
accentor = torch.hub.load(repo_or_dir='snakers4/silero-stress',
model='silero_stress')
sample_sent = "Меня зовут Лева Королев. Я из готов. И я уже готов открыть все ваши замки любой сложности!"
print(accentor(sample_sent))
# Мен+я зов+ут Л+ёва Корол+ёв. +Я +из г+отов. +И +я уж+е гот+ов откр+ыть вс+е в+аши замк+и люб+ой сл+ожности!
For some configuration tips refer to Configuration wiki page.
You can:
- Use CPU/GPU version;
- Use flags to customize word stress /
ёplacements; - Use common accentor and homosolver independently;
- Connect your own regex/phrases to homosolver to adjust predictions, or solve OOV homographs;
Key Features
-
Wide coverage
Silero Stress covers ~4M known Russian words and word forms with 100% accuracy. It also covers ~2.2K homographs with F1 score of 0.92, per-word accuracy of 94% and total dataset accuracy of 94%.
-
Fast
On 1 CPU thread every ordinary word takes ~0.5ms to process, every 400-char sentence with two homographs (common prod case) takes ~30ms.
-
Lightweight and portable
Total package is about 50MB in size, boasting ~400x compression ratio.
-
General and generalizable
Silero Stress was trained on a large dataset, containing ~4M known words and word forms and ~200M annotated sentences with homographs. It also works with unknown (and invented) words with 60-70% accuracy. You can also add regex/phrases to homosolver to adjust predictions.
-
No Strings Attached
Published under permissive license (MIT) Silero Stress has zero strings attached - no telemetry, no keys, no registration, no built-in expiration, no keys or vendor lock.
-
Minimal and minified
Code bloat, unnecessary dependencies and libraries are removed. Silero Stress depends only on PyTorch as a neural engine and the Python standard library.
-
Other Languages
We also released
ukrandbelaccentors (without homographs) and some vocabularies foranother 18 languages. Check our wiki for details.
Typical Use Cases
- Academic research
- Text-to-speech applications
- Telephony and call-center automation, voice bots
Links
Get In Touch
Try our models, create an issue, start a discussion, join our telegram chat, email us, read our news.
Please see our wiki for relevant information and email us directly.
Citations
@misc{Silero Stress,
author = {Silero Team},
title = {Silero Stress: pre-trained enterprise-grade automated stress and homograph disambiguation for the Russian language},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/snakers4/silero-stress}},
commit = {insert_some_commit_here},
email = {hello@silero.ai}
}
Vocabulary issues
If you see any problems with any particular words, please send your examples as an issue or a discussion.
Metadata
Release files for silero-stress 1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| silero_stress-1.5.tar.gz | 38.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| silero_stress-1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 77.4 MB
Release files / silero_stress-1.5.tar.gz
| Download URL | silero_stress-1.5.tar.gz |
|---|---|
| Size | 38.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c65082b57dde8e0597892dea0a8722f78cac60eac56dce967de0e418aa2a987f
|
|
BLAKE2b-256 checksum How to use checksums |
ada586479d5536dc261416edf36fe20a70529f5e52a4cff3d4fbf9c85fc9d71e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / silero_stress-1.5-py3-none-any.whl
| Download URL | silero_stress-1.5-py3-none-any.whl |
|---|---|
| Size | 38.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
408e333e67ebb407be656f32e8d5c46ad811c2598ebdbaed0e627ee980579e4a
|
|
BLAKE2b-256 checksum How to use checksums |
d4cae5af7cf4f85a1422824463ab885880f00ab39e0fe9589342eadfc98862de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|