Skip to main content

Russian Word Stress by Silero

Project description

Mailing list : test Mailing list : test License: MIT

Open In Colab Open In Colab

header


Silero Stress


Silero Stress — pre-trained enterprise-grade automated stress and homograph disambiguation for the Russian language.

For 19 other languages please refer here.


metrics_histogram


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.

Key Features


  • Wide coverage

    Silero Stress covers ~4M known Russian words and word forms with 100% accuracy. It also covers ~2K homographs with F1 score of 0.85, per-word accuracy of 91% and total dataset accuracy of 93%.

  • 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 ~120M annotated sentences with homographs. It also works with unknown (and invented) words with 60-70% accuracy.

  • 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 ukr and bel accentors (without homographs) and some vocabularies for another 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

silero_stress-1.4.tar.gz (38.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

silero_stress-1.4-py3-none-any.whl (38.6 MB view details)

Uploaded Python 3

File details

Details for the file silero_stress-1.4.tar.gz.

File metadata

  • Download URL: silero_stress-1.4.tar.gz
  • Upload date:
  • Size: 38.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for silero_stress-1.4.tar.gz
Algorithm Hash digest
SHA256 40770053fe7cf0fd6613e31a8bc6309a7ae025da4e7febe97282c5c21860a65c
MD5 616b8692ed60fa8c1dcb15da76743438
BLAKE2b-256 fcf7f3bd17e658343373b76afc00c1fcff63ee225c90363e7e2730a199aab2b9

See more details on using hashes here.

File details

Details for the file silero_stress-1.4-py3-none-any.whl.

File metadata

  • Download URL: silero_stress-1.4-py3-none-any.whl
  • Upload date:
  • Size: 38.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for silero_stress-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c772725dc03c647e2b33961280dc35f41b7f43ac0861575884fea0c2a6cb8ae2
MD5 6788815e48ec8bf562f8305cea4cdba6
BLAKE2b-256 ba725edf26c74a8d48640108976db5bc3e9e59722b63ccaa36b21894bf79ad77

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page