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