Skip to main content

A minimalist one-word subtitle generator with Neobrutalism UI

Project description

๐ŸŽฌ OneWord AI - Subtitle Generator

Generate cinematic one-word subtitles from video/audio using Whisper AI

Python License Whisper

Perfect for creators making high-energy reels, shorts, and TikToks!


โœจ Features

  • ๐ŸŽฏ Three Subtitle Modes: One Word, Two Word Punch, Phrase Mode
  • ๐ŸŒ Multi-Language: Auto-detect or specify (English, Hindi, Urdu, Spanish)
  • ๐Ÿค– Multiple Models: Medium, Large, and Hindi2Hinglish (Oriserve/Prime) ๐Ÿ†•
  • ๐Ÿ“ฆ Python Package: Installable via pip with oneword-cli and oneword-web commands
  • ๐Ÿ’ป Local CLI: Robust command-line tool for batch processing
  • ๐ŸŒ Web UI: Beautiful Neobrutalism-styled web interface
  • โ˜๏ธ Cloud Ready: Works on Google Colab and Hugging Face Spaces
  • ๐Ÿณ Docker Support: Containerized deployment

๐Ÿš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/Ambrishyadav-byte/OnewordAI.git
cd OnewordAI

# Install as a package
pip install -e .

Prerequisites: Ensure FFmpeg is installed on your system.

Usage

๐Ÿ–ฅ๏ธ CLI (Command Line)

See CLI.md for full documentation.

# Basic usage
oneword-cli -i video.mp4

# Full options
oneword-cli -i video.mp4 -m medium -lang hi -mode oneword

๐ŸŒ Web UI

# Start server & open browser
oneword-web

Features:

  • Drag & drop file upload
  • Real-time progress tracking
  • Instant SRT download
  • Responsive Neobrutalism design

โ˜๏ธ Google Colab

Open in Colab

  1. Open OneWord_Colab.ipynb in Colab
  2. Run all cells
  3. Upload your video
  4. Download your SRT!

๐Ÿค— Hugging Face Space

python app_gradio.py

Or deploy to Hugging Face Spaces for a hosted version!

๐Ÿ“Š Subtitle Modes

Mode Description Use Case
One Word Each word = separate subtitle High-energy, attention-grabbing content
Two Word Punch Groups of 2 words Punchy, impactful messaging
Phrase Mode Full sentence segments Traditional subtitle style

๐ŸŽจ Web UI Preview

The web interface features a stunning Neobrutalism design:

  • Bold black borders
  • Vibrant color palette
  • Sharp shadows
  • Grid background pattern
  • Smooth animations

๐Ÿณ Docker Deployment

# Build image
docker build -t oneword-ai .

# Run container
docker run -p 8000:8000 oneword-ai

๐Ÿ“ Project Structure

minimalist-one-word-subtitle-generator/
โ”œโ”€โ”€ onewordai/                    # Source code (package)
โ”‚   โ”œโ”€โ”€ core/
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ engine.py          # Core subtitle generation logic
โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ main.py            # FastAPI backend
โ”‚   โ””โ”€โ”€ web/
โ”‚       โ”œโ”€โ”€ index.html         # Web UI
โ”‚       โ”œโ”€โ”€ style.css          # Neobrutalism styles
โ”‚       โ””โ”€โ”€ app.js             # Frontend logic
โ”œโ”€โ”€ cli.py                     # CLI interface
โ”œโ”€โ”€ app_gradio.py              # Gradio app for HF Spaces
โ”œโ”€โ”€ OneWord_Colab.ipynb        # Google Colab notebook
โ”œโ”€โ”€ Dockerfile                 # Docker configuration
โ”œโ”€โ”€ requirements.txt           # Python dependencies
โ””โ”€โ”€ README.md

๐Ÿ› ๏ธ Development

API Endpoints

  • POST /upload - Upload video/audio file
  • POST /process - Start transcription job
  • GET /status/{job_id} - Check job progress
  • GET /download/{job_id} - Download generated SRT

Requirements

  • Python 3.8+
  • FFmpeg
  • PyTorch
  • OpenAI Whisper
  • FastAPI (for web server)
  • Gradio (for HF Spaces)

๐Ÿ’ก Tips for Creators

Video Editing Workflow

  1. Generate SRT using OneWord AI
  2. Import into your editor:
    • CapCut: Text โ†’ Local Captions โ†’ Upload
    • VN Editor: Text โ†’ SRT โ†’ Import
    • Premiere Pro: File โ†’ Import โ†’ Captions
  3. Apply animations (Pop, Spring, Bounce)
  4. Customize colors and fonts

Best Practices

  • Use Tiny model for quick drafts
  • Use Base model for production (best balance)
  • Use Small model for technical/complex content
  • One Word mode works best for 30-60 sec reels
  • Enable language selection for multilingual content

๐Ÿค Contributing

Contributions welcome! Open an issue or submit a PR.

Ideas for improvements:

  • Auto-capitalization for emphasis
  • Color-coded keywords
  • Export with burned-in subtitles
  • Batch processing multiple files

๐Ÿ“œ License

MIT License - see license.txt

๐Ÿค Credits

Built with โค๏ธ by Ambrish

Follow for updates: @ambrish.yadav.1


โญ Star this repo if you find it useful!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oneword_ai-0.1.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oneword_ai-0.1.0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file oneword_ai-0.1.0.tar.gz.

File metadata

  • Download URL: oneword_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for oneword_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 109bf0f3140674520f31a4319e44e8d7b15e0a8a302cbbab33503f35942a9a19
MD5 f57233651dfdcd49a54ce8d24325cfb9
BLAKE2b-256 9cf283f14ec909eafc38e0eaa86630febdee632a678f2eb750836d44fcc08edc

See more details on using hashes here.

File details

Details for the file oneword_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: oneword_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for oneword_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c5d3de902f592409bee8e0faac648208996b0fa82df4179f480a6900ac87498
MD5 cbf782db71f8ce954ad6d343e0983895
BLAKE2b-256 df7832f08b3672b25e9faacd2d8b7957c9e476329910e39ebe078525374914f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page