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
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-cliandoneword-webcommands - ๐ป 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
OneWord_Colab.ipynbin Colab - Run all cells
- Upload your video
- 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 filePOST /process- Start transcription jobGET /status/{job_id}- Check job progressGET /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
- Generate SRT using OneWord AI
- Import into your editor:
- CapCut: Text โ Local Captions โ Upload
- VN Editor: Text โ SRT โ Import
- Premiere Pro: File โ Import โ Captions
- Apply animations (Pop, Spring, Bounce)
- 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
- OpenAI Whisper - Speech recognition
- FastAPI - Backend framework
- Gradio - ML web interfaces
Built with โค๏ธ by Ambrish
Follow for updates: @ambrish.yadav.1
โญ Star this repo if you find it useful!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
109bf0f3140674520f31a4319e44e8d7b15e0a8a302cbbab33503f35942a9a19
|
|
| MD5 |
f57233651dfdcd49a54ce8d24325cfb9
|
|
| BLAKE2b-256 |
9cf283f14ec909eafc38e0eaa86630febdee632a678f2eb750836d44fcc08edc
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c5d3de902f592409bee8e0faac648208996b0fa82df4179f480a6900ac87498
|
|
| MD5 |
cbf782db71f8ce954ad6d343e0983895
|
|
| BLAKE2b-256 |
df7832f08b3672b25e9faacd2d8b7957c9e476329910e39ebe078525374914f0
|