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.


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)
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.


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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for silero_stress-1.1.tar.gz
Algorithm Hash digest
SHA256 a126224672ca5f5ccaede3ed9109853c49890bfafd91d4d5ae73eae3a7c25a77
MD5 f6419c90d1bab16ff04c0444c05d0387
BLAKE2b-256 152817f69dccf222ef4bfdebccc44affecd481b0d5ba5957a16b9b0ac9d44838

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for silero_stress-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37241c75ffb32aad9e938cffc10317fb462e068d43a33268ac260b5ea067d900
MD5 04a658ca920a1e843f6adff00c4bf3fc
BLAKE2b-256 655675e78a834e518dce19f6a6eb5f2d11aa1364d003c6d0efbbe81246886c91

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