Skip to content

gukenji/translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬 Whisper Subtitle Generator

This project is a web application that uses OpenAI Whisper to generate subtitles for videos or embed subtitles directly into video files.

The project includes:

  • ⚙️ A FastAPI backend (running on port 8000)
  • 🎨 A React frontend (running on port 3000)
  • 🐳 A full Docker setup for easy execution

🚀 Getting Started

✅ Requirements

  • Docker installed on your system
  • Minimum system requirements vary depending on CPU or GPU usage:

🔧 CPU Mode

  • Dual-core processor (Intel/AMD)
  • 8 GB RAM (16 GB recommended for large videos)
  • No GPU required

⚡ GPU Mode (CUDA)

You can check your GPU compatibility here: CUDA GPUs

⚠️ Note: If you're using CUDA, make sure the NVIDIA Container Toolkit is correctly configured on your machine.


🛠️ Install NVIDIA Drivers + Toolkit (Linux/WSL2)

Step 1: Install NVIDIA Driver

sudo apt update
sudo apt install -y nvidia-driver-535
sudo reboot

Verify with:

nvidia-smi

Step 2: Install NVIDIA Container Toolkit

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
  sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit

sudo nvidia-ctk runtime configure --runtime=docker
# Restart Docker Desktop manually or with: sudo systemctl restart docker (Linux only)

📦 Running the App

👇 Select CPU or GPU (CUDA) mode

We use .env files to switch between CPU and GPU builds.

✅ CPU (default)

cp .env.cpu .env
docker compose --env-file .env up --build

⚡ GPU (CUDA)

cp .env.gpu .env
docker compose --env-file .env up --build
  • The backend API will be available at: http://localhost:8000
  • The frontend UI will be available at: http://localhost:3000

🌐 Access from Other Devices (Same Wi-Fi)

You can use this app from any device connected to the same Wi-Fi network by visiting:

http://<your-ip-address>:3000

🔍 How to find your IP address

On the machine running the app, open a terminal and run:

Windows

ipconfig

Look for the line: IPv4 Address.

macOS / Linux

ifconfig | grep 192.

Copy the IP address (usually something like 192.168.x.x) and open in any browser:

http://192.168.x.x:3000

📂 Features

  • Upload a video file
  • Select input language and subtitle format
  • Option to generate .srt, .vtt, .txt, etc.
  • Option to embed subtitles directly into the video
  • Download subtitle file and/or subtitled video

🧠 Powered By


📄 License

MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors