YAML Basics

YAML is a simple, human-readable data format. Here are the most important rules for editing:

Syntax Rules

  • Comments: Lines starting with # are comments
  • Key-Value Pairs: Format is key: value (colon + space)
  • Quotes: Usually not needed - just write word: replacement
  • Case Sensitivity: The plugin is case-insensitive - EXAMPLEWORD in text will also be replaced by exampleword: lalala
  • Indentation: Technically only spaces should be used, but modern editors like Notepad++ convert tabs automatically
# Correct ✓
khorinis: Korriniss
game: Gäim

# Wrong ✗
khorinis:Korriniss  # No space after colon
game : Gäim         # Space before colon

Avoiding Common Errors

⚠️ Faulty YAML files can cause the plugin to malfunction!

  • Always use colon with space after (key: value not key:value)
  • No space before the colon
  • Save file as UTF-8
  • If problems occur: Use Notepad++ or VS Code (convert tabs automatically)

Word Replacements

Word replacements allow you to correct or adjust the pronunciation of specific words. This is especially useful for proper names, places, or terms that are mispronounced by the TTS engine.

⚠️ Important Note for Future Updates:

Currently one replacements file is used for all languages. In a future update, replacements will be language-specific to avoid errors in other languages.

Future filenames:

  • Union_RealTime_TTS_Replacements_de.yaml (German)
  • Union_RealTime_TTS_Replacements_en.yaml (English)
  • Union_RealTime_TTS_Replacements_po.yaml (Polish)
  • etc. for other languages

File: Union_RealTime_TTS_Replacements.yaml

In this file you define replacement rules in the format Original: Replacement.

# Example Word Replacements
# Format: Original: Replacement

# Place names
khorinis: Koriniss
hafenstraße: Hafenstrasse

# Character names
diego: dijego

# Gothic terms
erz: Erts
paladine: Paladiene
orks: Orks

# English terms (phonetic)
cool: kuhl
nice: neis
game: Gäim
loot: luut

# Slang/Dialect
joah: Yo
joa: Yo
ey: ay
buddy: Badiy

Use Cases

  • Pronunciation Correction: Phonetically adjust proper names or fantasy terms
  • Dialect Smoothing: Convert colloquial language to standard language
  • Abbreviations: Spell out abbreviations for better comprehension

Voice-ID Mapping

The Voice-ID Mapping function allows you to assign a specific voice to each NPC. This prevents all NPCs from sounding the same and provides more variety.

File: Union_RealTime_TTS_Voice_Mapping.yaml

In this file, NPC Voice-IDs are assigned to specific voices. The plugin supports 21 different German base voices, which are mapped to 123 IDs (with repetitions for variation).

# Example Voice Mapping
# Format: voice_id: "model_name"

voice_mapping:
  1: "de_DE-ID01"
  3: "de_DE-ID03"
  4: "de_DE-ID04"
  5: "de_DE-ID05"
  
  # Special voice (Jase)
  16: "de_DE-Jase"
  
  # More IDs up to 123
  100: "de_DE-ID04"
  101: "de_DE-ID05"

Available Voices

The plugin uses the following German voices:

  • Base Voices: de_DE-ID01 to de_DE-ID19
  • Special Voices: de_DE-jorgenson_altherren (Fallback), de_DE-Jase (ID16)
  • Mapping: The 21 base voices are distributed across 123 IDs and repeat

💡 Voices are automatically rotated so not all NPCs sound the same. The exact mapping can be found in Union_RealTime_TTS_Voice_Mapping.yaml.

Practical Examples

Example 1: Complete Voice Mapping for a Mod

# Voice Mapping for a Custom Mod
# Main characters
voice_mapping:
  1: "de_DE-ID01"      # Hero
  2: "de_DE-ID03"      # Companion
  3: "de_DE-Jase"      # Important NPC (special voice)

  # City guards Khorinis
  10: "de_DE-ID05"
  11: "de_DE-ID06"
  12: "de_DE-ID07"
  13: "de_DE-ID08"

  # Merchants
  20: "de_DE-ID10"
  21: "de_DE-ID11"
  22: "de_DE-ID12"
  
  # Old characters
  30: "de_DE-jorgenson_altherren"
  31: "de_DE-jorgenson_altherren"

Example 2: Extensive Word Replacements

# Pronunciation optimizations for Gothic
# Place names
khorinis: Koriniss
hafenstraße: Hafenstrasse

# NPCs
diego: dijego

# Gothic terms
erz: Erts
orks: Orks
paladine: Paladiene

# English gaming terms
cool: kuhl
nice: neis
game: Gäim
loot: luut
noob: Nuub
noobs: Nuubs

# Dialect/Colloquial
joah: Yo
joa: Yo
ey: ay
buddy: Badiy

Example 3: Special Characters

# Special characters with matching voices
voice_mapping:
  # Old/Wise characters
  50: "de_DE-jorgenson_altherren"
  51: "de_DE-jorgenson_altherren"

  # Different character types
  60: "de_DE-ID01"
  61: "de_DE-ID03"
  62: "de_DE-ID04"
  
  # Special important NPCs
  70: "de_DE-Jase"
  
  # More variation
  80: "de_DE-ID10"
  81: "de_DE-ID11"
  82: "de_DE-ID12"

Tips & Tricks

🎯 Tip 1: Work Systematically

First create a list of all important NPCs, then assign appropriate voices.

🔊 Tip 2: Test Voices

Test different voices in-game to find the best combination.

📝 Tip 3: Create Backups

Always create a backup of your YAML files before making major changes.

🔄 Tip 4: Work Iteratively

Add replacements gradually as you notice pronunciation errors.