Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
BroheimSileroTTS
Self-contained in-game TTS for Valheim - speaks chat, runes, raven/intro, center-screen messages, dreams and NPC dialogue. Bundled pure-C# Silero neural voices (RU/EN/DE) via TorchSharp. No Python, no extra downloads, no Piper.
| Date uploaded | 2 weeks ago |
| Version | 1.3.0 |
| Download link | BROHEIM_CYBRP-BroheimSileroTTS-1.3.0.zip |
| Downloads | 18 |
| Dependency string | BROHEIM_CYBRP-BroheimSileroTTS-1.3.0 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.
Preferred version: 5.4.2202README
Broheim Silero TTS
Self-contained in-game text-to-speech for Valheim. The mod speaks aloud the text you normally only read: chat messages, rune/raven and intro text, center-screen messages, dreams and NPC dialogue โ powered entirely by bundled Silero neural voices running in pure C# through TorchSharp (libtorch).
No Python, no extra client-side install, no runtime downloads. Voices work out of the box on the first launch.
Inspired by Azumatt's TextToSpeech
This mod was inspired by Azumatt's TextToSpeech โ the idea of speaking Valheim's chat, runes, raven and NPC text aloud. All code in this package is written from scratch; a big thank-you to Azumatt for the original concept and for his work in the Valheim modding community.
| Language | Model | Speakers | Notes |
|---|---|---|---|
| ๐ท๐บ Russian | v5_4_ru |
4 | Automatic stress marking + ั, digits โ words, Latin โ Cyrillic transliteration. n-gram accentor (the v5 BERT homograph disambiguation is not bundled โ homographs use n-gram-predicted stress). |
| ๐ฌ๐ง English | v3_en |
119 (12 curated) | 12 hand-picked male/female voices grouped by pitch. |
| ๐ฉ๐ช German | v3_de |
5 | Umlaut handling (ร/รค/รถ/รผ). |
This is a client-side mod โ it does not need to be installed on, and is not synced to, the dedicated server.
Requirements
- BepInExPack Valheim โ Thunderstore package
denikson-BepInExPack_Valheim(declared as a dependency). - Windows x64 client. The bundled libtorch native runtime
(
torch_cpu.dll,c10.dll,LibTorchSharp.dll, โฆ) is Windows-only. - ~475 MB of disk space for the bundled Silero models + libtorch runtime (shipped inside the package, so the download is one-time).
Install
Install via Thunderstore / r2modman / Gale, or manually unzip the package
and copy BepInEx/plugins/Broheim-SileroTTS/ into your Valheim
BepInEx/plugins/ directory.
On first launch the mod generates
BepInEx/config/Broheim.SileroTTS.cfg with sensible defaults
(Russian / aidar, chat + center narration on).
Configuration โ BepInEx/config/Broheim.SileroTTS.cfg
Section [Voice]
| Setting | Default | Description |
|---|---|---|
Language |
Russian |
Bundled Silero model: Russian (v5_4_ru, n-gram auto-stress + ั, 4 voices), English (v3_en, 119 voices) or German (v3_de, 5 voices, umlaut handling). |
Speaker |
aidar |
Speaker name for the chosen language (see list below). |
Pitch |
1.0 |
Pitch multiplier. < 1.0 = lower / rougher / deeper (e.g. 0.85), > 1.0 = higher / brighter. Range 0.5 โ 2.0. Shifts the model's pitch contour without retraining. |
Speed |
1.0 |
Speech speed multiplier. < 1.0 = slower (e.g. 0.85), > 1.0 = faster. Range 0.5 โ 2.0. Controls token-duration scaling. |
Volume |
1.0 |
Output volume multiplier. > 1.0 amplifies (e.g. 1.5 louder, 2.0 very loud; hard-clipped). < 1.0 = quieter. Range 0.0 โ 3.0. Independent of the game's master volume. |
OverlapMode |
Queue |
How overlapping lines are handled: Queue (wait for current to finish, then play next โ no overlap), Interrupt (cut off current, play new), Overlap (mix). |
PreRollMs |
120 |
Leading silence (ms) before each utterance. Fixes "first letters swallowed" โ the audio source drops the first buffer on start, so a lead-in lets the first phoneme land clean. 0 = off. Range 0 โ 500. |
TrimTrailingSilence |
true |
Cut the model's trailing quiet tail so narration feels snappy. |
Section [Channel Volume]
Per-channel volume multipliers (applied on top of [Voice] Volume). Range 0.0 โ 3.0.
| Setting | Default | Description |
|---|---|---|
ChatVolume |
1.0 |
Chat narration. |
CenterVolume |
1.0 |
Center-screen messages (Huginn tips, events). |
RunesVolume |
1.0 |
Rune / raven / intro text. |
NpcVolume |
1.0 |
NPC dialogue. |
DreamsVolume |
1.0 |
Dream / portal text. |
Valid Speaker per language
- Russian:
aidar(male),baya,kseniya,xenia(v5_4_ru has 4 voices;eugenefalls back toxenia). UsePitch < 1.0(e.g.0.85) to makeaidarrougher/deeper. - English:
en_0โฆen_117โ curated subset:en_0,en_20,en_27,en_42,en_46,en_70,en_80,en_91,en_48,en_116,en_82,en_67,en_95(anyen_Nindex is accepted). - German:
bernd_ungerer,eva_k,friedrich,hokuspokus,karlsson
Section [Triggers]
| Setting | Default | Description |
|---|---|---|
NarrateChat |
true |
Speak incoming chat messages. |
SkipOwnChat |
true |
Do not speak your own outgoing chat messages. Turn off to hear yourself (useful when testing a voice). |
AnnounceSpeaker |
false |
Prepend the speaker name and verb to chat narration (e.g. "Haldor said in chat: ..."). Off = voice only the message body. |
NarrateCenter |
true |
Speak center-screen messages (Huginn tips, boss defeats, event starts). |
NarrateRunes |
false |
Speak rune, raven and intro/tutorial text. |
NarrateNpc |
false |
Speak NPC dialogue, positioned near the speaker. |
NarrateDreams |
false |
Speak the dream/portal text shown between sessions. |
How it works
Silero runs entirely inside the mod via TorchSharp โ the same libtorch
runtime that Python uses, but loaded directly from .NET. The Silero TorchScript
.pt models are loaded directly by libtorch, which bypasses the well-known ONNX
exporter failures on Silero's dynamic prim::If runtime checks. No ONNX, no
Python, no sidecar process.
Text preprocessing is a hand-ported C# implementation, verified
bit-identical against the original Python apply_tts pipeline:
- Russian: automatic stress assignment, ั insertion, n-gram stress
embedding, MLP stress model, digits โ Russian words (e.g.
3.14โ ยซััะธ ะทะฐะฟััะฐั ะพะดะธะฝ ัะตัััะตยป) and Latin โ Cyrillic transliteration so English words/names are attempted instead of silently skipped. - English / German: lowercasing, symbol filtering, ASCII/umlaut mapping, per-language speaker/symbol maps.
The neural tts_model (duration and pitch predictors, encoder, decoder and
vocoder) runs natively in libtorch from silero_assets/<lang>/tts_runner.pt.
silero_assets/ layout (shipped with the mod):
silero_assets/
ru/tts_runner.pt v5_4_ru neural model
ru/silero_accentor_v5.dat RU n-gram accentor: embedding, MLP, symbols, exceptions (16969)
en/tts_runner.pt v3_en
en/preprocess.dat EN symbol/speaker map
de/tts_runner.pt v3_de
de/preprocess.dat DE symbol/speaker/umlaut map
TorchSharp.dll + libtorch-cpu-win native DLLs (shared, ~256 MB)
Bundled .NET Standard 2.0 facades resolve TorchSharp's managed dependency closure under Valheim's Mono runtime โ that is what makes "no client install" possible.
Troubleshooting
- No sound. Confirm
LanguageandSpeakermatch (e.g. don't set a German speaker withLanguage = Russian). Relaunch after changing the voice. - Numbers or English words skipped (RU). The RU accentor expands digits to words and transliterates Latin before synthesis; if something specific is still skipped it is usually an unsupported symbol in the accentor's table.
- Slow first utterance. The first synthesis warms up libtorch (JIT + native library init). Subsequent utterances are fast.
- Want a different voice. Pick another
Speakerfor the current language, or switchLanguage. To make a voice rougher/deeper without changing the speaker, lowerPitch(e.g.0.85); to speed up/slow down, adjustSpeed.
Credits & acknowledgements
- Silero TTS models by the Silero team.
- TorchSharp โ Microsoft's .NET bindings for libtorch / PyTorch.
- Valheim chat/rune/NPC/center/dream narration via Harmony patches on the game's public API.
This mod was inspired by Azumatt's TextToSpeech (https://thunderstore.io/c/valheim/p/Azumatt/TextToSpeech/) โ the idea of speaking Valheim's chat, runes, raven and NPC text aloud. All code in this package is written from scratch; big thanks to Azumatt for the original concept and for his work on the Valheim modding community.
Source code and releases: https://github.com/alexkuryshko/Broheim-SileroTTS
See CHANGELOG.md for the version history.
CHANGELOG
Changelog
1.3.3
- Separate
RuneStonesVolumechannel. Rune stones (TextViewer.ShowTextstyle 0) now route to a dedicatedChannel.RuneStoneswith its own[Channel Volume] RuneStonesVolume(default 1.0, 0.0โ3.0), so rune stones can be quieter than the raven. Raven/intro/tutorial (style 1/2) stay onChannel.Runes. Fixes "rune stones too loud" without silencing the raven. - Soft clipping (tanh). Replaced hard clipping at ยฑ1.0 with
Math.Tanhsaturation inWavPlayer. Higher gain now compresses smoothly instead of distorting;vol=1stays near-linear,vol>=2pushes into smooth saturation. - Normalization target lowered to 0.74 so the volume knob keeps headroom.
1.3.2
- Sentence chunking. Long narration (raven tutorial, NPC dialogue) is now split into sentence-sized pieces before synthesis (
SileroEngine.SplitIntoChunks, max 200 chars/chunk). Each chunk is synthesized as its own utterance and the PCM is concatenated with a 150 ms silence gap. Gives natural pauses between the header and the body and between paragraphs, and keeps each forward pass short so prosody/energy stay strong (long single utterances drifted and went quiet). LineJoinheader/body joiner (SpeechHooks). Ensures the header ends with sentence punctuation so it becomes its own chunk with a pause before the body โ fixes headers read "merged" (ัะปะธัะฝะพ) into the rest of the text. Applied toLoreTextHook(raven/runes/intro) andNpcDialogueHook.
1.3.1
- Peak normalization.
WavPlayer.ToClipnow peak-normalizes the decoded PCM to a target of 0.74 (above a 0.01 noise floor) before applying the channel/master volume. Silero often synthesizes RU text at a low peak (~0.1); without normalization the volume multiplier just clipped the few loud peaks while the body stayed inaudible. The raven/runes are now clearly audible atRunesVolume = 2.
1.3.0
- Voice overlap control โ new
[Voice] OverlapMode:Queue(default): wait for the current line to finish, then play the next โ no overlap. Fixes the raven/text collision.Interrupt: cut off the current line, play the new one immediately.Overlap: let multiple lines mix. Narration is now serialized through a single queue (one synth + one playback at a time).
- Per-channel volume โ new
[Channel Volume]section:ChatVolume,CenterVolume,RunesVolume,NpcVolume,DreamsVolume, each 0.0โ3.0, multiplied on top of the master[Voice] Volume. - Silence trim + first-letters fix โ new
[Voice] TrimTrailingSilence(default true) cuts the model's long quiet tail so narration is snappy; new[Voice] PreRollMs(default 120) adds a short lead-in so the first phoneme isn't swallowed by the audio source's start-up ramp. This directly fixes "ะฟะตัะฒัะต ะฑัะบะฒั ะฟัะพะณะปะฐััะฒะฐัััั". - Reworked
WavPlayerto take volume/pre-roll/trim as parameters;Play2DClip/Play2DTransient/PlaySpatialClipreplace the oldPlayOnPlayer/PlayAtPoint.
1.2.1
- Volume control โ new
[Voice]Volume(default1.0, range 0.0โ3.0). Above 1.0 amplifies the signal (e.g. 1.5 noticeably louder, 2.0 very loud), hard-clipped to avoid distortion. Below 1.0 = quieter. Independent of the game's master volume. Applied at PCM level so the boost works on both the 2D narration and spatial NPC sources.
1.2.0
- Best male voice by default:
Speakerdefault changed toaidar(the only male voice inv5_4_ru). - Tone & speed controls โ new
[Voice]config entries:Pitch(default1.0, range 0.5โ2.0):< 1.0lower/rougher/deeper,> 1.0higher/brighter. Scales the model's per-token pitch contour.Speed(default1.0, range 0.5โ2.0):< 1.0slower,> 1.0faster. Scales token-duration (durs_rate).- No model retraining or
.ptrebuild required โ applied at synthesis time.
- Config descriptions updated for
v5_4_ru(4 voices) and the new entries.
1.1.0
- Russian upgraded to Silero
v5_4_ru(newer neural model, 4 voices:kseniya,aidar,baya,xenia;eugenefalls back toxenia). - Rewrote the RU accentor as a pure-C# port of the v5
AccentorNgram(native-Cyrillic n-gram + stress/ั MLP, 16969 exceptions), verified 1:1 against the original v5 TorchScript accentor on a wide test set. - The v5 BERT homograph disambiguation (
HomoSolver, 1924 words) is not bundled โ homographs use the n-gram-predicted stress. This keeps the package Python/BERT-free; the only behavioural delta vs full v5SileroStressis on those 1924 homographs. - License attribution completed: Silero models (CC BY-NC-SA 4.0, non-commercial),
libtorch (BSD-3), TorchSharp + .NET facades (MIT). See
LICENSE.md. - Digits โ Russian words and Latin โ Cyrillic transliteration retained.
1.0.0
- Initial release.
- Self-contained in-game TTS for Valheim: chat, runes/raven/intro, center-screen messages, dreams and NPC dialogue.
- Bundled pure-C# Silero neural voices (RU
v4_ru, ENv3_en, DEv3_de) running via TorchSharp/libtorch โ no Python, no client-side install, no downloads. - Russian preprocessing: auto-stress + ั, digits โ words, Latin โ Cyrillic transliteration.
- Configurable language/speaker and per-channel narration toggles.