Real-time voice translation overlay for CS2 (Counter-Strike 2) that translates foreign-language teammates to English using the OpenAI Whisper API.
- Non-intrusive overlay — transparent, draggable window that sits on top of CS2
- Cloud-powered — uses OpenAI Whisper API, no GPU required
- VAC-safe — no game process injection, just a display overlay
- Real-time — 2-3 second latency for translations
- Multi-language — supports Chinese, Japanese, Korean, Russian, Spanish, French, German, and more
- Smart filtering — optionally skips English audio to save API costs
- Desktop app with GUI — settings window with audio device picker, language selector, and live log panel
- Secure — API key stored in Windows Credential Manager, not in files
- WASAPI loopback — capture speaker/headphone output directly, no virtual cable needed
- Windows 10/11
- Python 3.10+
- OpenAI API key (get one here)
- Internet connection
# Clone the project
git clone https://github.com/danialothman/cs2-translator.git
cd cs2-translator
# Create virtual environment
python -m venv .venv
.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtpython app.pyThe settings window opens where you can:
- Enter your OpenAI API key (stored securely in Windows Credential Manager)
- Select an audio device — pick your speakers/headphones as a loopback device to capture game audio, or a microphone for direct input
- Choose source language — Chinese, Japanese, Korean, Russian, etc. or auto-detect
- Adjust buffer duration — shorter = faster but less context, longer = more accurate
- Toggle "Skip English" — prevents translating English-to-English
- Click Start Translating
The overlay appears on top of your game showing timestamped translations. Drag it to reposition.
The app uses the OpenAI Whisper API which costs $0.006 per minute of audio.
| Mode | Cost | Notes |
|---|---|---|
| Skip English OFF | ~$0.006/min | Single API call per chunk, translates everything |
| Skip English ON | ~$0.012/min for foreign speech | Two calls (detect language + translate), but free for English chunks |
A typical CS2 session costs well under $1.
All settings are configured through the GUI and persisted in settings.json. Available options:
- Audio device — any input device or speaker loopback
- Source language — language to translate from (or auto-detect)
- Buffer duration — 2-6 seconds of audio per chunk
- Skip English — avoid translating English speech
- Click Refresh to re-scan devices
- Make sure your audio device is connected and enabled in Windows Sound Settings
- Verify your key at platform.openai.com/api-keys
- Make sure you have credits loaded on your account
- Run Python as administrator
- Use borderless windowed mode in CS2 (not exclusive fullscreen)
- Reduce buffer duration (2-3 seconds)
- Check your internet connection
- This is a known Whisper issue with silence/noise — common hallucinations are filtered automatically
- If it persists, try increasing the buffer duration
No. This tool:
- Does not inject code into CS2
- Does not modify game files
- Does not access game memory
- Only displays a window overlay (same as Discord overlay, MSI Afterburner, etc.)
cs2-translator/
├── app.py # Entry point
├── settings_window.py # GUI settings and control window
├── overlay.py # Translation overlay display
├── translator.py # OpenAI Whisper API integration
├── audio_capture.py # Audio device enumeration and capture
├── config_manager.py # Settings persistence (JSON + keyring)
├── requirements.txt # Python dependencies
└── settings.json # User settings (gitignored)
- OpenAI Whisper API for speech translation
- PyAudioWPatch for WASAPI loopback support
MIT License — free to use and modify