Skip to content

danielfcollier/py-opentranscriber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎙️ OpenTranscriber

A private, offline, and open-source audio/video transcription tool.

OpenTranscriber is a powerful desktop application built with Python and OpenAI's Whisper technology. It allows you to transcribe video and audio files locally on your machine—ensuring your data never leaves your computer.

License Python Status

✨ Features

  • 🔒 100% Privacy: Runs entirely offline. No data is sent to the cloud.
  • 🧠 AI-Powered: Uses OpenAI's state-of-the-art Whisper models (Tiny, Base, Small, Medium, Large).
  • 🎞️ Media Support: Works with MP4, MP3, WAV, MKV, FLAC, OGG, and M4A.
  • 📝 Built-in Editor:
    • Live Preview: Listen to the audio while editing segments.
    • Pagination: Handle large files smoothly without freezing.
    • Timeline Seeking: Click and drag to jump to specific parts of the audio.
  • ⚙️ Formats: Export to SRT (Subtitles) or TXT (Plain Text).
  • 💻 Cross-Platform: Designed for Windows, Linux, and macOS.

🚀 Installation

Prerequisites

  • Python 3.12+
  • FFmpeg (Required for audio processing)
    • Linux: sudo apt install ffmpeg
    • Mac: brew install ffmpeg
    • Windows: Download from ffmpeg.org (or use choco install ffmpeg).

1. Clone the Repository

git clone https://github.com/danielfcollier/py-opentranscriber.git
cd py-opentranscriber

2. Install Dependencies (using uv)

We use uv for fast package management.

# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Sync dependencies
uv sync

🖥️ Usage

You can run the application in two modes: GUI (Graphic Interface) or CLI (Command Line).

🎨 Graphical Interface (Recommended)

Launch the visual tool to select files, choose models, and edit transcripts.

make run-gui
# OR
uv run opentranscriber-gui

How to use:

  1. Click Select Media File.
  2. Choose the Model Size (Base is fast, Large is accurate).
  3. Click Start Transcription.
  4. Once finished, the Editor will open.
  5. Play the audio, correct the text, and click Save & Finish.

⌨️ Command Line Interface

For automation or headless servers.

make run-cli input_file="video.mp4"
# OR
uv run opentranscriber-cli "video.mp4" --model small --format srt

Arguments:

  • input_file: Path to the file.
  • --model: tiny, base, small, medium, large (default: base).
  • --format: srt or txt (default: srt).

🛠️ Development

Project Structure

src/transcriber/
├── gui.py       # Main GUI application (Tkinter)
├── cli.py       # Command Line Interface logic
├── __main__.py  # Entry point
└── ...

Running Tests and Linters

# Run Linting (Ruff)
make lint

# Run Security Scan (Trivy)
trivy fs .

☕ Support

If this tool saved you time, consider buying me a coffee!

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.