Multi-LangTTS-MC

Adds real-time multilingual Text-to-Speech (TTS) to Minecraft chat using Google Translate and ElevenLabs, with async processing and zero performance impact.

21

Quick challenge

How far can you run before the mobs catch you?

Multi-LangTTS-MC

Multi LangTTS MC

> Multi-language Text-to-Speech Mod for Minecraft

---

📋 Overview

Multi LangTTS MC is a client-side modification that delivers real-time, multi-language Text-to-Speech (TTS) synthesis for in-game chat. Designed for accessibility, immersion, and multilingual server environments, the mod intercepts chat messages, processes them asynchronously, and converts them into high-quality speech using configurable external providers—all without impacting game performance.

---

✨ Core Features

🔊 Text-to-Speech Engine

- Rate Limiting: - Rate Limiting (Free, 100+ languages) - Rate Limiting (Premium, expressive voices, 29+ languages) - Rate Limiting: All synthesis, network requests, and audio decoding run on dedicated background threads. - Rate Limiting: Reduces redundant API calls and latency for repeated phrases. - Rate Limiting: Strict byte-signature detection filters malformed or error responses. - Rate Limiting: Configurable minimum interval between synthesis requests prevents queue saturation.

💬 Chat Processing

- Player Name Handling: Automatically converts player messages, server broadcasts, and system notifications into spoken audio. - Player Name Handling: Configurable cooldown thresholds prevent repetitive messages from triggering excessive playback. - Player Name Handling: Strips Minecraft formatting codes (`§`, `&`), handles bidirectional markers, and applies RTL formatting for Arabic scripts. - Player Name Handling: Optional speaker labels with language-aware formatting (e.g., "يقول" for Arabic, "says" for English).

🗂️ Chat Logging System

- Async I/O: Plaintext logs stored in `logs/multilangtts-mc/chat-YYYY-MM-DD.txt`. - Async I/O: Scrollable interface with per-message replay via TTS. - Async I/O: Export session logs to custom file paths. - Async I/O: Non-blocking file writes prevent gameplay stutter.

⚙️ Configuration & UI

- Test Suite: Full settings interface accessible via ModMenu or keybind. - Test Suite: Live configuration reloading without restarting the game. - Test Suite: - Google: Language code selection - ElevenLabs: API key, Voice ID, Model ID, Stability, Similarity Boost, Style Exaggeration, Speed - Test Suite: Custom phrase input with one-click playback verification.

⌨️ Keybindings

| Action | Default Key | Category | |--------|-------------|----------| | Toggle TTS | `B` | Multi LangTTS MC | | Open Chat Log Viewer | `V` | Multi LangTTS MC |

*Fully customizable via Minecraft Controls menu*

---

Supported Locales (Markdown Table)

| Locale Code | Language | Region | |-------------|----------|--------| | `af_za` | Afrikaans | South Africa | | `ar_sa` | Arabic | Saudi Arabia | | `bg_bg` | Bulgarian | Bulgaria | | `cs_cz` | Czech | Czech Republic | | `cy_gb` | Welsh | United Kingdom | | `da_dk` | Danish | Denmark | | `de_de` | German | Germany | | `de_at` | German | Austria | | `de_ch` | German | Switzerland | | `el_gr` | Greek | Greece | | `en_us` | English | United States | | `en_gb` | English | United Kingdom | | `es_es` | Spanish | Spain | | `es_mx` | Spanish | Mexico | | `es_ar` | Spanish | Argentina | | `es_cl` | Spanish | Chile | | `es_ec` | Spanish | Ecuador | | `es_uy` | Spanish | Uruguay | | `es_ve` | Spanish | Venezuela | | `et_ee` | Estonian | Estonia | | `eu_es` | Basque | Spain | | `fa_ir` | Persian | Iran | | `fi_fi` | Finnish | Finland | | `fil_ph` | Filipino | Philippines | | `fr_fr` | French | France | | `fr_ca` | French | Canada | | `ga_ie` | Irish | Ireland | | `gl_es` | Galician | Spain | | `hi_in` | Hindi | India | | `hr_hr` | Croatian | Croatia | | `hu_hu` | Hungarian | Hungary | | `id_id` | Indonesian | Indonesia | | `is_is` | Icelandic | Iceland | | `it_it` | Italian | Italy | | `ja_jp` | Japanese | Japan | | `ko_kr` | Korean | South Korea | | `lb_lu` | Luxembourgish | Luxembourg | | `lt_lt` | Lithuanian | Lithuania | | `lv_lv` | Latvian | Latvia | | `mk_mk` | Macedonian | North Macedonia | | `mt_mt` | Maltese | Malta | | `nl_nl` | Dutch | Netherlands | | `nl_be` | Dutch | Belgium | | `no_no` | Norwegian | Norway | | `pl_pl` | Polish | Poland | | `pt_pt` | Portuguese | Portugal | | `pt_br` | Portuguese | Brazil | | `ro_ro` | Romanian | Romania | | `ru_ru` | Russian | Russia | | `sk_sk` | Slovak | Slovakia | | `sl_si` | Slovenian | Slovenia | | `sv_se` | Swedish | Sweden | | `sw_ke` | Swahili | Kenya | | `th_th` | Thai | Thailand | | `tr_tr` | Turkish | Turkey | | `uk_ua` | Ukrainian | Ukraine | | `vi_vn` | Vietnamese | Vietnam | | `zh_cn` | Chinese (Simplified) | China | | `zh_tw` | Chinese (Traditional) | Taiwan |

TTS Language Coverage

| Provider | Languages | Notes | |----------|-----------|-------| | ElevenLabs | 100+ | Configurable via language code; default: `ar` | | ElevenLabs | 29+ | Via `eleven_multilingual_v2` model; requires API key |

---

---

👥 Contributors

| Contributor | Role | |-------------|------| | DFD3 | Lead Development, Architecture, Core Systems | | DFD3 | Co-Development, Testing, Integration |

---

---

⚠️ Important Notes

- Audio Playback: Required for premium voice synthesis. Obtain it from https://elevenlabs.io The API key is stored locally in the Minecraft config files on the user’s device It is only used to access Text-to-Speech (TTS) services and is not shared externally by the mod Audio Playback https://elevenlabs.io/app/developers/api-keys > Create Key > set Audio Playback to Audio Playback Avoid using full-access API keys for better security - Audio Playback: Public endpoint usage is subject to undocumented throttling. - Audio Playback: Automatic RTL embedding via Unicode bidi markers; stripped in logs for readability. - Audio Playback: Blocking on worker thread only—never impacts main game loop.

---

>* 🌐 Releases: https://github.com/mgv-hub/Multi-LangTTS-MC >* 🐛 Releases: https://github.com/mgv-hub/Multi-LangTTS-MC/issues >* 📦 Releases: https://github.com/mgv-hub/Multi-LangTTS-MC/releases

ADS