Skip to content

VicPitic/gamecap

Repository files navigation

GameCap

An Open Source Deepgram Wrapper for Real-Time Game Captions & Translation

GameCap is a powerful, open-source tool that wraps the Deepgram API to provide real-time subtitles and translation for your desktop audio. Designed primarily for gamers, it captures system audio directly, transcribes it with low latency using Deepgram's state-of-the-art AI, translates it to your target language, and displays it in a customizable overlay on top of your game.

GameCap Example

Features

  • 🚀 Deepgram Powered: Leverages Deepgram's high-performance speech-to-text API for lightning-fast, accurate transcription.
  • 🎮 Automatic Game Detection: Automatically scans and detects installed Steam games for quick launching.
  • 🌐 Real-time Translation: Instantly translates transcribed text into your preferred language using Google Translate.
  • 🖥️ Desktop Audio Capture: Records internal system audio (WASAPI loopback), so it works with any game, video, or application.
  • 🎨 Customizable Overlay: Fully adjustable subtitle window—change font, size, color, and position to match your setup.
  • ⚙️ Modern Launcher: A user-friendly GUI to manage settings, API keys, and launch configurations without touching code.
  • ⌨️ Hotkey Support: Toggle subtitles on/off instantly with Ctrl+Shift+S.

Prerequisites

  • OS: Windows (Required for WASAPI loopback audio capture)
  • Python: 3.8 or higher
  • Deepgram API Key: You can get a free API key from Deepgram Console.

Installation

  1. Clone the repository:

    git clone https://github.com/VicPitic/gamecap.git
    cd gamecap
  2. Install dependencies:

    pip install -r requirements.txt

Usage

Using the Launcher (Recommended)

The easiest way to use GameCap is through the included launcher application.

  1. Start the Launcher:

    python launcher.py
  2. First Time Setup:

    • Go to the Settings tab.
    • Enter your Deepgram API Key.
    • Select your Source Language (audio language) and Target Language (subtitle language).
    • Customize the subtitle appearance (Font, Size, Color).
  3. Launch a Game:

    • The Games tab will list your detected Steam games.
    • Select a game and click Launch to start the game with the subtitle overlay.
    • Alternatively, use "Start Overlay Only" to use GameCap with any currently running application.

Manual Start

You can also run the main script directly if you prefer command-line usage or have configured config.py manually:

python main.py

Configuration

Launcher Settings

The launcher persists your configuration in settings.json. You can modify:

  • API Key: Your Deepgram credentials.
  • Languages: Source and target languages for translation.
  • Appearance: Font family, size, weight, text color, and background opacity.
  • Overlay Position: Adjust the width and vertical position of the subtitles.

Advanced Configuration (config.py)

For developers or advanced users, config.py contains core defaults:

  • Audio buffer sizes and latency tuning.
  • Deepgram model selection (default: general).
  • Recording duration limits.
  • Default hotkeys.

Project Structure

gamecap/
├── launcher.py              # Entry point for the GUI Launcher
├── main.py                  # Core logic entry point
├── config.py                # Default configuration
├── requirements.txt         # Python dependencies
├── launcher_app/            # Launcher GUI source code
│   ├── app.py               # Main GUI application logic
│   ├── game_detector.py     # Steam game detection logic
│   └── widgets.py           # Custom UI widgets
├── audio/                   # Audio capture logic
│   └── audio_capture.py     # WASAPI loopback recording
├── services/                # Core services
│   └── transcription_service.py # Deepgram & Translation integration
└── ui/                      # Overlay UI
    └── subtitle_overlay.py  # Transparent subtitle window

License

This project is open source and available under the MIT License.


Note: This project is a community-driven wrapper and is not officially affiliated with Deepgram.

About

An Open Source Deepgram Wrapper for Real-Time Game Captions & Translation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages