52 lines
1.3 KiB
Markdown
52 lines
1.3 KiB
Markdown
# AI Video Transcriber & Translator
|
|
|
|
This tool extracts audio from videos, transcribes it using OpenAI's Whisper model, and translates the transcript using Google's Gemini API.
|
|
|
|
## Setup
|
|
|
|
1. **Install Dependencies:**
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
*Note: You need `ffmpeg` installed on your system.*
|
|
|
|
2. **API Key:**
|
|
Set your Gemini API key as an environment variable:
|
|
```bash
|
|
export GEMINI_API_KEY="your_api_key_here"
|
|
```
|
|
|
|
## Usage
|
|
|
|
### Quick Start (Wizard)
|
|
For a user-friendly, interactive experience, run the wizard script in the root directory:
|
|
|
|
```bash
|
|
./run_wizard.py
|
|
```
|
|
This will guide you through selecting files, languages, and enabling features like cleanup and embedding.
|
|
|
|
### Advanced (CLI)
|
|
Run the `main.py` script directly:
|
|
|
|
```bash
|
|
python ai_transcriber/main.py <path_to_video_or_folder> [options]
|
|
```
|
|
|
|
### Options:
|
|
* `--model`: Whisper model size (`tiny`, `base`, `small`, `medium`, `large`). Default: `base`.
|
|
* `--lang`: Target language for translation. Default: `English`.
|
|
* `--force`: Overwrite existing transcript/translation files.
|
|
|
|
### Examples:
|
|
|
|
**Single File:**
|
|
```bash
|
|
python main.py ../my_video.mp4
|
|
```
|
|
|
|
**Entire Directory (Recursive):**
|
|
```bash
|
|
python main.py ../videos_folder/ --lang "Spanish" --model small
|
|
```
|