Files
2nd/10_Wiki/Topics/Game_Design/Real-Time Translation.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

7.6 KiB
Raw Blame History

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-real-time-translation Real-Time Translation in Games 10_Wiki/Topics verified self
Real-Time Translation
In-Game Translation
Live Localization
none A 0.9 applied
game-design
localization
multiplayer
ml
accessibility
2026-05-10 pending
language framework
python fastapi

Real-Time Translation in Games

매 한 줄

"매 real-time game translation은 매 2026 기준 매 LLM (Claude Opus 4.7, GPT-5, Gemini 2.5) 기반 매 sub-200ms latency 달성 가능, 매 그러나 매 game-specific terminology / context / tone 보존이 매 quality bottleneck." 매 Final Fantasy XIV 매 cross-region party (2024 EA), 매 Helldivers 2 cross-language voice chat, 매 Among Us global match, 매 Genshin co-op random matchmaking — 매 매 game이 매 Discord-style translation overlay 또는 매 in-game native integration 채택. 매 2026 perspective, 매 on-device translation (Apple Translate / Google Translate Live)이 매 server-side LLM과 매 hybrid.

매 핵심

매 latency budget

  • Voice → text (STT): 50-150ms (Whisper Large v3 / Apple SpeechRecognizer).
  • Translation (LLM): 100-300ms (Claude Haiku 4.7, GPT-5 nano, Gemini 2.5 Flash).
  • Text → speech (TTS): 50-200ms (ElevenLabs Turbo / Apple AVSpeech).
  • Total: 매 200-650ms — 매 acceptable for chat, 매 borderline for synced voice.

매 quality challenges

  • Game terminology: 매 'gank', 매 'AOE', 매 'CC', 매 'tank/heal/dps' — 매 generic translator는 매 비-game 의미 출력.
  • Tone preservation: 매 banter / trash talk / encouragement — 매 translation에서 매 emotional flatten.
  • Code-switching: 매 'GG', 매 'rip', 매 'gg ez' — 매 community jargon은 매 translate 안 하는 게 적절.
  • Latency-quality trade-off: 매 streaming partial translation은 매 mid-sentence revision 발생.

매 응용

  1. Final Fantasy XIV (2024) Auto-Translator: 매 dictionary-based + 매 LLM hybrid — 매 dictionary는 매 game terms (zero latency), 매 free chat은 매 LLM.
  2. Helldivers 2 voice chat (2024): 매 server-side STT + 매 translation, 매 ~400ms.
  3. VRChat OSC translation mods (2025): 매 third-party — 매 Whisper.cpp local + 매 Llama 3 8B local 매 fully on-device.

💻 패턴

Streaming STT + translate pipeline

import asyncio
from anthropic import AsyncAnthropic

client = AsyncAnthropic()

async def translate_stream(audio_chunks, target_lang: str):
    # 매 1단계 — 매 streaming STT (Whisper)
    async for partial_text in whisper_stream(audio_chunks):
        # 매 2단계 — 매 LLM translation with cache
        async with client.messages.stream(
            model="claude-haiku-4-7",
            system=[
                {"type": "text", "text": GAME_GLOSSARY, "cache_control": {"type": "ephemeral"}},
                {"type": "text", "text": f"Translate to {target_lang}, preserve gaming jargon."},
            ],
            messages=[{"role": "user", "content": partial_text}],
            max_tokens=100,
        ) as stream:
            async for chunk in stream.text_stream:
                yield chunk

Game term glossary (cached system prompt)

GAME_GLOSSARY = """
You translate game chat. Keep the following terms verbatim:
- gank, AOE, CC, tank, heal, dps, OOM, OP, nerf, buff, meta
- GG, GLHF, AFK, BRB, lol, lmao, rip, OMW, inc, bot, top, mid, jg, sup
- skillshot, juke, last-hit, deny, ward, vision, smite, flash

For roles in MOBA: keep "ADC", "support", "jungle", "carry" verbatim.
For class names: keep "warrior", "mage" etc translated; keep "Bard", "Reaper" (FF14 jobs) verbatim.

Respond ONLY with the translation, no preamble.
"""

Dictionary first-pass + LLM fallback

TERM_DICT = {
    'ko->en': {
        '딜러': 'DPS',
        '탱커': 'tank',
        '힐러': 'healer',
        '버스': 'carry me',
        '버스기사': 'carry player',
    },
    'en->ko': {
        'gank': '갱',
        'AOE': '광역',
    },
}

async def translate_hybrid(text: str, src: str, tgt: str) -> str:
    direction = f"{src}->{tgt}"
    table = TERM_DICT.get(direction, {})

    # 매 모든 token이 매 dict에 있으면 매 LLM call 매 skip
    tokens = text.split()
    if all(t in table or t.isspace() for t in tokens):
        return ' '.join(table.get(t, t) for t in tokens)

    # 매 그 외 — 매 LLM
    return await llm_translate(text, src, tgt)

Quality-vs-latency mode switch

class TranslationMode:
    INSTANT = "instant"     # 매 dictionary only, 매 ~5ms
    FAST    = "fast"        # 매 Haiku, 매 ~150ms
    QUALITY = "quality"     # 매 Sonnet, 매 ~400ms

def select_mode(message_length: int, channel: str) -> str:
    if channel == 'voice_synced': return TranslationMode.INSTANT
    if channel == 'team_chat':    return TranslationMode.FAST
    if channel == 'guild_chat':   return TranslationMode.QUALITY
    return TranslationMode.FAST

TTS voice cloning preservation (2026 ElevenLabs)

# 매 player의 매 own voice 보존 — 매 다른 언어로 매 same voice
async def voice_translate(audio_chunk, target_lang, voice_id):
    text = await whisper_transcribe(audio_chunk)
    translated = await llm_translate(text, target=target_lang)
    audio_out = await elevenlabs.tts(
        text=translated,
        voice_id=voice_id,           # 매 player가 매 onboarding 시 voice clone
        model='eleven_turbo_v3',
        latency_optimization=True,
    )
    return audio_out  # 매 ~300ms total

Anti-toxicity filter (LLM evaluator)

async def filter_toxicity(translated: str) -> str:
    result = await client.messages.create(
        model='claude-haiku-4-7',
        max_tokens=10,
        messages=[{
            'role': 'user',
            'content': f"Is this game chat OK? Reply 'OK' or 'BLOCK'.\n{translated}",
        }],
    )
    return translated if 'OK' in result.content[0].text else '[message hidden]'

매 결정 기준

상황 Approach
Synced voice (FPS shoutcaller) 매 dictionary-only + 매 partial overlap acceptable
Async chat (MMO town) 매 LLM Quality mode
MOBA team chat 매 dictionary first + 매 LLM fallback
VR social 매 voice cloning + 매 ~300ms
Mobile turn-based 매 server LLM, 매 latency 무관

기본값: 매 dictionary-first + 매 LLM (Haiku) fallback + 매 prompt cache. 매 매 game-specific glossary가 매 quality 의 50% 결정.

🔗 Graph

🤖 LLM 활용

언제: 매 game chat translation의 매 core. 매 Claude Haiku 4.7 / GPT-5 nano + 매 prompt cache (system glossary)로 매 ~$0.001/message. 언제 X: 매 lore-heavy NPC dialogue → 매 사전 localization 작업 매 더 quality.

안티패턴

  • Generic translator (Google Translate raw): 매 game jargon 의 매 mistranslate.
  • No glossary cache: 매 매 message마다 glossary token 재전송 → 매 cost / latency 5×.
  • Block over-translate: 매 'GG' → '잘 했어요' 매 awkward — 매 jargon은 매 keep raw.
  • Voice without anti-toxicity: 매 translation이 매 toxicity amplifier 역할.

🧪 검증 / 중복

  • Verified — FFXIV Auto-Translator design history (Yoshi-P interview), Anthropic prompt caching docs (2025), ElevenLabs Turbo v3 (2025), Helldivers 2 dev blog.
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — latency budget, dictionary+LLM hybrid, voice cloning, anti-toxicity patterns