Files
2nd/10_Wiki/Topic_General/Game_Design/Real-Time Translation.md
T
Antigravity Agent 9148c358d0 docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
2026-07-05 00:33:48 +09:00

190 lines
7.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: wiki-2026-0508-real-time-translation
title: Real-Time Translation in Games
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [Real-Time Translation, In-Game Translation, Live Localization]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [game-design, localization, multiplayer, ml, accessibility]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: python
framework: 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
```python
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)
```python
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
```python
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
```python
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)
```python
# 매 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)
```python
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 |