Registry / ai-ml / silero

silero

JSON →
library0.5.5pypypiunverified

Silero Models provides a collection of pre-trained enterprise-grade Text-to-Speech (TTS) models primarily focused on Russian and CIS languages, as well as speech-to-text models. It leverages PyTorch for model inference, offering high-quality and fast speech generation. The library is actively maintained with frequent updates, currently at version 0.5.5, with a focus on expanding language support and model quality.

pip install torch torchaudio silero soundfile
INSTALL
IMPORT
SIG · SILERO
S
silero
ai-mlpythonv0.5.5
Install
68.5s avg
Import
5403ms
Disk
4890MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 76.8s
py 3.11
✕ build_error
✓ 70s
py 3.12
✕ build_error
✓ 67.85s
py 3.13
✕ build_error
✓ 59.2s
py 3.9
✕ build_error
✕ timeout
4890MB installed
● package 4890MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

torch
import torch
torchaudio
import torchaudio
silero.utils.save_audio
from silero.utils import save_audio
silero.utils.read_audio
from silero.utils import read_audio

This quickstart demonstrates how to load a pre-trained Silero TTS model using `torch.hub.load` and synthesize speech from text. It uses the 'v5_ru' Russian model with a specific speaker. Make sure `torch`, `torchaudio`, and `soundfile` are installed as they are crucial prerequisites, even if not direct dependencies of the `silero` PyPI package itself.

import torch import torchaudio # Ensure PyTorch is available and get device device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') # --- TTS Quickstart --- # Define model parameters model_id = 'v5_ru' language = 'ru' speaker = 'baya' put_accent = True put_yo = True sample_rate = 48000 # or 24000, 16000 text = 'В недрах тундры выдры в гетрах тырят в вёдра ядра кедров.' try: # Load the Silero TTS model from torch.hub model, _ = torch.hub.load(repo_or_dir='snakers4/silero-models', model='silero_tts', language=language, speaker=model_id, put_accent=put_accent, put_yo=put_yo) model.to(device) # Synthesize audio audio_tensor = model(text=text, speaker=speaker, sample_rate=sample_rate) # Example of saving audio (requires 'soundfile') # from silero.utils import save_audio # output_path = 'output_audio.wav' # save_audio(audio_tensor.cpu(), output_path, sample_rate) # print(f'Audio saved to {output_path}') print(f"Successfully synthesized audio. Tensor shape: {audio_tensor.shape}, Sample Rate: {sample_rate}") except Exception as e: print(f"An error occurred during TTS synthesis: {e}") print("Please ensure PyTorch, TorchAudio, and potentially SoundFile are installed.")
Debug
Known issues
breakingSilero v5.0 and later versions (e.g., v5.2) deprecated and removed legacy models (v1 and v2) and tools. Attempting to load these older models will result in errors.
fix
Migrate to using `v5_ru` or `v5_cis_*` model identifiers. Refer to the official GitHub repository's `models.yml` or quickstart for current supported model IDs and languages.
affects: >=5.0
breakingAs of v5.1, `torchaudio` was removed as a direct dependency of the `silero` pip package. While `silero` installs without it, `torchaudio` is still essential for most functionalities (e.g., audio I/O, many model operations).
fix
Always install `torchaudio` explicitly alongside `silero` using `pip install torchaudio` or include it in your requirements file.
affects: >=5.1
gotchaThe core dependencies `torch`, `torchaudio`, and `soundfile` are not always automatically installed by `pip install silero`. Missing these will lead to `ModuleNotFoundError` or `RuntimeError` during model loading or inference.
fix
Always install all necessary dependencies explicitly: `pip install torch torchaudio silero soundfile`.
affects: All versions
gotchaThe license for Silero Models changed to GNU AGPL 3.0 in v5.4. Previous versions used CC BY-NC 4.0. Users should be aware of the implications of the AGPL-3.0 license for commercial or proprietary use.
fix
Review the GNU AGPL 3.0 license agreement to ensure compliance with its terms, especially if using Silero Models in a commercial or distribution context.
affects: >=5.4
Upgrade
Version history
0.5.5latest on PyPI · released Feb 3, 2026
Audit
Dependencies
torchoptionalCore deep learning framework for model inference. Essential for all model operations.
torchaudiooptionalAudio processing library required for loading, saving, and manipulating audio data. Essential for I/O operations and some model components.
soundfileoptionalRequired by torchaudio for reading and writing various audio file formats.
Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources