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 accentor (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.2.tar.gz (36.1 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.2-py3-none-any.whl (36.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: silero_stress-1.2.tar.gz
  • Upload date:
  • Size: 36.1 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.2.tar.gz
Algorithm Hash digest
SHA256 86f8c9ca026ef5f634ae07ae163f50e46ff2d859abc65bb15393c9b0cce74a4f
MD5 9715a6d7602f66dc2a3089b7166478a1
BLAKE2b-256 5247746857c2e4ad40d300ec6032a850db3c3b860e8698312d5a097cff708893

See more details on using hashes here.

File details

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

File metadata

  • Download URL: silero_stress-1.2-py3-none-any.whl
  • Upload date:
  • Size: 36.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 85d029b40460452ebe37898d9cff2ff309a1b764cfc9fca101678adba9fa1014
MD5 5a8ede85e3c5d29827587307395c1bf8
BLAKE2b-256 2b4d3ffd52f4aa4311a750c6a46c364b97781b5b3b3b0b4e8a4c51415e737f51

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