# Whisper Scribe

YouTube video transcription using OpenAI Whisper with a beautiful web interface.

## Features

- **Simple Web Interface** - Clean, modern UI with real-time progress tracking
- **YouTube Support** - Just paste any YouTube URL to transcribe
- **AI Analysis** - Get summaries, key takeaways, and topic extraction
- **Translation** - Translate transcriptions to 12+ languages
- **Multiple Export Formats** - Download as TXT, SRT, or VTT subtitles
- **Batch Processing** - Queue multiple videos for transcription
- **History** - Browse and search your past transcriptions
- **Automatic Chunking** - Handles long videos by splitting audio automatically

## Installation

```bash
pip install whisper-scribe
```

### Prerequisites

- Python 3.9 or higher
- FFmpeg (required for audio processing)
- OpenAI API key

#### Installing FFmpeg

**macOS:**
```bash
brew install ffmpeg
```

**Ubuntu/Debian:**
```bash
sudo apt update && sudo apt install ffmpeg
```

**Windows:**
Download from [ffmpeg.org](https://ffmpeg.org/download.html) or use:
```bash
choco install ffmpeg
```

## Quick Start

1. **Start the server:**
   ```bash
   whisper-scribe
   ```

2. **Open your browser:**
   The app will automatically open at http://localhost:8000

3. **Configure your API key:**
   Click the Settings icon and enter your OpenAI API key

4. **Transcribe:**
   Paste a YouTube URL and click Transcribe!

## Command Line Options

```bash
whisper-scribe --help                 # Show all options
whisper-scribe --port 9000            # Use custom port
whisper-scribe --host 0.0.0.0         # Listen on all interfaces
whisper-scribe --no-browser           # Don't open browser automatically
whisper-scribe --reload               # Enable auto-reload (development)
```

## Configuration

Settings are saved in `~/.whisper-scribe/config.json`:

- **OpenAI API Key**: Required for transcription and AI analysis
- **Output Directory**: Where transcription files are saved (default: `~/.whisper-scribe/transcriptions/`)

## AI Features

### Analysis
After transcription, click "Analyze with AI" to get:
- **Summary** - A concise overview of the video content
- **Key Takeaways** - The main points and insights
- **Topics** - Main themes discussed in the video

Analysis responses are in the same language as the original video.

### Translation
Translate your transcriptions to:
- English, Spanish, French, German, Italian, Portuguese
- Russian, Japanese, Chinese, Korean, Arabic, Hindi

## API

Whisper Scribe exposes a REST API at `/api`:

- `POST /api/transcribe` - Start a transcription job
- `GET /api/status/{job_id}` - Check job status
- `GET /api/result/{job_id}` - Get transcription result
- `POST /api/analyze/{item_id}` - AI analysis
- `POST /api/translate/{item_id}` - Translation
- `GET /api/history` - List past transcriptions
- `GET /api/export/{item_id}` - Export in various formats

## License

MIT License - see [LICENSE](LICENSE) for details.

## Author

Created by Issam Alameh
