oneword-ai 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: oneword-ai
3
+ Version: 0.1.2
4
+ Summary: Create viral-style one-word subtitles for Reels, Shorts & TikToks using AI. Perfect for content creators!
5
+ Author-email: Ambrish <ambrishyadav1110@gmail.com>
6
+ License: Copyright 2025 Ambrish
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13
+ Project-URL: Homepage, https://github.com/Ambrishyadav-byte/OnewordAI
14
+ Project-URL: Bug Tracker, https://github.com/Ambrishyadav-byte/OnewordAI/issues
15
+ Keywords: subtitles,ai,whisper,content-creation,video-editing
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ License-File: license.txt
19
+ Requires-Dist: openai-whisper>=20231117
20
+ Requires-Dist: torch>=2.0.0
21
+ Requires-Dist: fastapi>=0.100.0
22
+ Requires-Dist: uvicorn[standard]>=0.23.0
23
+ Requires-Dist: python-multipart>=0.0.6
24
+ Requires-Dist: ffmpeg-python>=0.2.0
25
+ Requires-Dist: gradio>=4.0.0
26
+ Requires-Dist: tqdm>=4.65.0
27
+ Requires-Dist: aiofiles>=23.0.0
28
+ Requires-Dist: transformers>=4.30.0
29
+ Requires-Dist: accelerate>=0.20.0
30
+ Requires-Dist: huggingface_hub>=0.16.0
31
+ Dynamic: license-file
32
+
33
+ # 🎬 OneWord AI - Cinematic Subtitle Generator
34
+
35
+ <div align="center">
36
+
37
+ **Generate viral-style one-word subtitles from video/audio using Whisper AI**
38
+
39
+ [![PyPI](https://img.shields.io/pypi/v/oneword-ai)](https://pypi.org/project/oneword-ai/)
40
+ [![Python](https://img.shields.io/badge/Python-3.9%2B-blue)](https://www.python.org/)
41
+ [![License](https://img.shields.io/badge/License-MIT-green)](license.txt)
42
+
43
+ Perfect for creating high-energy reels, shorts, and TikToks! 🚀
44
+
45
+ [Installation](#-installation) • [Usage](#-usage) • [Features](#-features) • [Credits](#-credits)
46
+
47
+ </div>
48
+
49
+ ---
50
+
51
+ ## ✨ Features
52
+
53
+ - 🎯 **Three Subtitle Modes**: One Word, Two Word Punch, Phrase Mode
54
+ - 🌍 **Multi-Language Support**: Auto-detect or specify (English, Hindi, Urdu, Spanish)
55
+ - 🤖 **Multiple AI Models**:
56
+ - OpenAI Whisper (Medium, Large)
57
+ - Hindi2Hinglish (Oriserve/Whisper-Hindi2Hinglish-Prime) 🇮🇳
58
+ - 💻 **Dual Interface**: CLI for power users, Web UI for visual workflow
59
+ - 📦 **Easy Installation**: One-line pip install
60
+ - ☁️ **Cloud Ready**: Works seamlessly on Google Colab
61
+
62
+ ---
63
+
64
+ ## 🚀 Installation
65
+
66
+ ```bash
67
+ pip install oneword-ai
68
+ ```
69
+
70
+ **Prerequisites**: Install [FFmpeg](https://ffmpeg.org/) on your system.
71
+
72
+ ---
73
+
74
+ ## 📖 Usage
75
+
76
+ ### Option 1: Web Interface (Easiest)
77
+
78
+ Start the web server:
79
+
80
+ ```bash
81
+ python -m onewordai.api.main
82
+ ```
83
+
84
+ Then open http://localhost:8000 in your browser.
85
+
86
+ **Features:**
87
+ - 📤 Drag & drop file upload
88
+ - 📊 Real-time download progress with speed & ETA
89
+ - ⏱️ Live transcription status updates
90
+ - ❌ Cancel processing anytime
91
+ - ⚠️ Reload protection (won't lose progress)
92
+ - 📥 Instant SRT download
93
+
94
+ ---
95
+
96
+ ### Option 2: Google Colab
97
+
98
+ Run OneWord AI in the cloud with Web UI or Python API:
99
+
100
+ [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Ambrishyadav-byte/OnewordAI/blob/main/OneWord_Colab.ipynb)
101
+
102
+ **The Colab notebook includes:**
103
+ - 🌐 **Option A**: Web UI with Gradio (free public URL, no setup required)
104
+ - 💻 **Option B**: Python API for direct code usage
105
+
106
+ ---
107
+
108
+ ### Option 3: Command Line (CLI)
109
+
110
+ For batch processing and automation:
111
+
112
+ ```bash
113
+ # Basic usage
114
+ python -m onewordai.cli -i video.mp4
115
+
116
+ # With options
117
+ python -m onewordai.cli -i video.mp4 -m medium -lang hi -mode oneword
118
+ ```
119
+
120
+ **See [CLI.md](CLI.md) for full documentation.**
121
+
122
+ ---
123
+
124
+ ## 📊 Subtitle Modes
125
+
126
+ | Mode | Description | Best For |
127
+ |------|-------------|----------|
128
+ | **oneword** | Each word = separate subtitle | High-energy viral content, reels |
129
+ | **twoword** | Groups of 2 words | Punchy messaging, Instagram posts |
130
+ | **phrase** | Full sentence segments | YouTube videos, longer content |
131
+
132
+ ---
133
+
134
+ ## 🎨 Model Options
135
+
136
+ | Model | Size | Speed | Quality | Language |
137
+ |-------|------|-------|---------|----------|
138
+ | **medium** | ~1.5GB | Fast | ⭐⭐⭐⭐ | Multi-language |
139
+ | **large** | ~3GB | Slower | ⭐⭐⭐⭐⭐ | Multi-language |
140
+ | **Oriserve/Whisper-Hindi2Hinglish-Prime** | ~1.5GB | Fast | ⭐⭐⭐⭐⭐ | Hindi → Hinglish |
141
+
142
+ > **Note**: Models are downloaded automatically on first use and cached locally.
143
+
144
+ ---
145
+
146
+ ## 🤝 Credits
147
+
148
+ This project wouldn't be possible without these amazing open-source projects:
149
+
150
+ ### Core Technologies
151
+ - **[OpenAI Whisper](https://github.com/openai/whisper)** - State-of-the-art speech recognition model
152
+ - **[Oriserve/Whisper-Hindi2Hinglish-Prime](https://huggingface.co/Oriserve/Whisper-Hindi2Hinglish-Prime)** - Fine-tuned Hindi to Hinglish transcription
153
+ - **[HuggingFace Transformers](https://github.com/huggingface/transformers)** - Model loading and inference framework
154
+
155
+ ### Backend & UI
156
+ - **[FastAPI](https://fastapi.tiangolo.com/)** - High-performance Python web framework
157
+ - **[Gradio](https://gradio.app/)** - ML web interface library
158
+ - **[FFmpeg](https://ffmpeg.org/)** - Multimedia processing toolkit
159
+
160
+ ### Special Thanks
161
+ - OpenAI team for making Whisper open-source
162
+ - Oriserve team for the specialized Hindi model
163
+ - All open-source contributors
164
+
165
+ ---
166
+
167
+ ## 📜 License
168
+
169
+ MIT License - see [license.txt](license.txt)
170
+
171
+ Free to use for personal and commercial projects!
172
+
173
+ ---
174
+
175
+ ## 👨‍💻 Author
176
+
177
+ **Built with ❤️ by [Ambrish Yadav](https://github.com/Ambrishyadav-byte)**
178
+
179
+ 💼 Connect: [@ambrish.yadav.1](https://instagram.com/ambrish.yadav.1)
180
+
181
+ 📦 PyPI: [oneword-ai](https://pypi.org/project/oneword-ai/)
182
+
183
+ ---
184
+
185
+ <div align="center">
186
+
187
+ ⭐ **Star this repo if you find it useful!** ⭐
188
+
189
+ [Report Bug](https://github.com/Ambrishyadav-byte/OnewordAI/issues) • [Request Feature](https://github.com/Ambrishyadav-byte/OnewordAI/issues)
190
+
191
+ </div>
@@ -1,15 +1,15 @@
1
- oneword_ai-0.1.0.dist-info/licenses/license.txt,sha256=ZlGk1ZMpgK_LQB1VTiN27JbvU-KL31byRxgM7wAmEu4,1060
1
+ oneword_ai-0.1.2.dist-info/licenses/license.txt,sha256=ZlGk1ZMpgK_LQB1VTiN27JbvU-KL31byRxgM7wAmEu4,1060
2
2
  onewordai/__init__.py,sha256=DW7ib3o1W0lchP960Mqdg_a-_aPPhPWgYKu5efR56ME,73
3
3
  onewordai/cli.py,sha256=kz8epolGelaSfbOXdIB8IaiwUBLaKD8uyP6RBGOkCMM,2008
4
4
  onewordai/api/__init__.py,sha256=W5bQNZGz2YLMXx1hC9e_eKhbf_GNFVYy3MC3D7gugUc,20
5
5
  onewordai/api/main.py,sha256=QGyg4q72QkodF4HFAz6KOA8d3AlucisUB1OAw2XpANk,7964
6
6
  onewordai/core/__init__.py,sha256=oTsOiTuWDAh1O6N9ZXfNFuiCmP3R99dBkEFljt3LI6Q,114
7
- onewordai/core/engine.py,sha256=CqHVfvRjXSHgkjcPagYEhvCGwM2ywSlhyTvTran7MK0,15631
7
+ onewordai/core/engine.py,sha256=cJRDL8A7S9R8NU-EIZYbiziae2oEUecByIFIi8k-RSo,15665
8
8
  onewordai/web/app.js,sha256=mOp_RRear_N8RTpNEsYs2oj6mkji_AaKXlpxFsAtH-M,11166
9
9
  onewordai/web/index.html,sha256=r1OSgeb35diHKmj1uWGnd-ltPBPz6aQp5mmcp2jTDmY,5995
10
10
  onewordai/web/style.css,sha256=InsF-b_e5-zRhwaUHKf7cHnenNv87zA82VjcjqIsOnE,10485
11
- oneword_ai-0.1.0.dist-info/METADATA,sha256=v5LBayOqcOffEvF6G7JXLumYGzdocKO1C5pzGy0ZeaE,7621
12
- oneword_ai-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
13
- oneword_ai-0.1.0.dist-info/entry_points.txt,sha256=qJ4u04rCiYtI5fCyPRBfTzW_-xc05BCSEct8YHzXX9Y,97
14
- oneword_ai-0.1.0.dist-info/top_level.txt,sha256=otwwf_hwyKfUYUJnculUSznHz9iCFJRrHgIHyLQRbfE,10
15
- oneword_ai-0.1.0.dist-info/RECORD,,
11
+ oneword_ai-0.1.2.dist-info/METADATA,sha256=DarH3-rmwPMDGEsoIXpcWmDW7lO5ayQoKYj3e3YpZDw,6846
12
+ oneword_ai-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
13
+ oneword_ai-0.1.2.dist-info/entry_points.txt,sha256=qJ4u04rCiYtI5fCyPRBfTzW_-xc05BCSEct8YHzXX9Y,97
14
+ oneword_ai-0.1.2.dist-info/top_level.txt,sha256=otwwf_hwyKfUYUJnculUSznHz9iCFJRrHgIHyLQRbfE,10
15
+ oneword_ai-0.1.2.dist-info/RECORD,,
onewordai/core/engine.py CHANGED
@@ -44,8 +44,8 @@ class SubtitleGenerator:
44
44
  def __init__(self, *args, **kwargs):
45
45
  super().__init__(*args, **kwargs)
46
46
 
47
- def display(self, msg=None, pos=None):
48
- super().display(msg, pos)
47
+ def display(self, msg=None, pos=None, *args, **kwargs):
48
+ super().display(msg, pos, *args, **kwargs)
49
49
  # Capture progress for status callback
50
50
  if status_callback and self.total:
51
51
  downloaded = self.n
@@ -1,237 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: oneword-ai
3
- Version: 0.1.0
4
- Summary: A minimalist one-word subtitle generator with Neobrutalism UI
5
- Author-email: Ambrish <ambrishyadav1110@gmail.com>
6
- License: Copyright 2025 Ambrish
7
-
8
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
-
12
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13
- Project-URL: Homepage, https://github.com/Ambrishyadav-byte/OnewordAI
14
- Project-URL: Bug Tracker, https://github.com/Ambrishyadav-byte/OnewordAI/issues
15
- Keywords: subtitles,ai,whisper,content-creation,video-editing
16
- Requires-Python: >=3.9
17
- Description-Content-Type: text/markdown
18
- License-File: license.txt
19
- Requires-Dist: openai-whisper>=20231117
20
- Requires-Dist: torch>=2.0.0
21
- Requires-Dist: fastapi>=0.100.0
22
- Requires-Dist: uvicorn[standard]>=0.23.0
23
- Requires-Dist: python-multipart>=0.0.6
24
- Requires-Dist: ffmpeg-python>=0.2.0
25
- Requires-Dist: gradio>=4.0.0
26
- Requires-Dist: tqdm>=4.65.0
27
- Requires-Dist: aiofiles>=23.0.0
28
- Requires-Dist: transformers>=4.30.0
29
- Requires-Dist: accelerate>=0.20.0
30
- Requires-Dist: huggingface_hub>=0.16.0
31
- Dynamic: license-file
32
-
33
- # 🎬 OneWord AI - Subtitle Generator
34
-
35
- <div align="center">
36
-
37
- **Generate cinematic one-word subtitles from video/audio using Whisper AI**
38
-
39
- [![Python](https://img.shields.io/badge/Python-3.8%2B-blue)](https://www.python.org/)
40
- [![License](https://img.shields.io/badge/License-MIT-green)](license.txt)
41
- [![Whisper](https://img.shields.io/badge/OpenAI-Whisper-orange)](https://github.com/openai/whisper)
42
-
43
- Perfect for creators making high-energy reels, shorts, and TikToks!
44
-
45
- </div>
46
-
47
- ---
48
-
49
- ## ✨ Features
50
-
51
- - 🎯 **Three Subtitle Modes**: One Word, Two Word Punch, Phrase Mode
52
- - 🌍 **Multi-Language**: Auto-detect or specify (English, Hindi, Urdu, Spanish)
53
- - 🤖 **Multiple Models**: Medium, Large, and **Hindi2Hinglish** (Oriserve/Prime) 🆕
54
- - 📦 **Python Package**: Installable via pip with `oneword-cli` and `oneword-web` commands
55
- - 💻 **Local CLI**: Robust command-line tool for batch processing
56
- - 🌐 **Web UI**: Beautiful Neobrutalism-styled web interface
57
- - ☁️ **Cloud Ready**: Works on Google Colab and Hugging Face Spaces
58
- - 🐳 **Docker Support**: Containerized deployment
59
-
60
- ## 🚀 Quick Start
61
-
62
- ### Installation
63
-
64
- ```bash
65
- # Clone the repository
66
- git clone https://github.com/Ambrishyadav-byte/OnewordAI.git
67
- cd OnewordAI
68
-
69
- # Install as a package
70
- pip install -e .
71
- ```
72
-
73
- **Prerequisites**: Ensure [FFmpeg](https://ffmpeg.org/) is installed on your system.
74
-
75
- ### Usage
76
-
77
- #### 🖥️ CLI (Command Line)
78
-
79
- See [CLI.md](CLI.md) for full documentation.
80
-
81
- ```bash
82
- # Basic usage
83
- oneword-cli -i video.mp4
84
-
85
- # Full options
86
- oneword-cli -i video.mp4 -m medium -lang hi -mode oneword
87
- ```
88
-
89
- #### 🌐 Web UI
90
-
91
- ```bash
92
- # Start server & open browser
93
- oneword-web
94
- ```
95
-
96
- Features:
97
- - Drag & drop file upload
98
- - Real-time progress tracking
99
- - Instant SRT download
100
- - Responsive Neobrutalism design
101
-
102
- #### ☁️ Google Colab
103
-
104
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/)
105
-
106
- 1. Open `OneWord_Colab.ipynb` in Colab
107
- 2. Run all cells
108
- 3. Upload your video
109
- 4. Download your SRT!
110
-
111
- #### 🤗 Hugging Face Space
112
-
113
- ```bash
114
- python app_gradio.py
115
- ```
116
-
117
- Or deploy to Hugging Face Spaces for a hosted version!
118
-
119
- ## 📊 Subtitle Modes
120
-
121
- | Mode | Description | Use Case |
122
- |------|-------------|----------|
123
- | **One Word** | Each word = separate subtitle | High-energy, attention-grabbing content |
124
- | **Two Word Punch** | Groups of 2 words | Punchy, impactful messaging |
125
- | **Phrase Mode** | Full sentence segments | Traditional subtitle style |
126
-
127
- ## 🎨 Web UI Preview
128
-
129
- The web interface features a stunning **Neobrutalism** design:
130
- - Bold black borders
131
- - Vibrant color palette
132
- - Sharp shadows
133
- - Grid background pattern
134
- - Smooth animations
135
-
136
- ## 🐳 Docker Deployment
137
-
138
- ```bash
139
- # Build image
140
- docker build -t oneword-ai .
141
-
142
- # Run container
143
- docker run -p 8000:8000 oneword-ai
144
- ```
145
-
146
- ## 📁 Project Structure
147
-
148
- ```
149
- minimalist-one-word-subtitle-generator/
150
- ├── onewordai/ # Source code (package)
151
- │ ├── core/
152
- │ │ ├── __init__.py
153
- │ │ └── engine.py # Core subtitle generation logic
154
- │ ├── api/
155
- │ │ ├── __init__.py
156
- │ │ └── main.py # FastAPI backend
157
- │ └── web/
158
- │ ├── index.html # Web UI
159
- │ ├── style.css # Neobrutalism styles
160
- │ └── app.js # Frontend logic
161
- ├── cli.py # CLI interface
162
- ├── app_gradio.py # Gradio app for HF Spaces
163
- ├── OneWord_Colab.ipynb # Google Colab notebook
164
- ├── Dockerfile # Docker configuration
165
- ├── requirements.txt # Python dependencies
166
- └── README.md
167
- ```
168
-
169
- ## 🛠️ Development
170
-
171
- ### API Endpoints
172
-
173
- - `POST /upload` - Upload video/audio file
174
- - `POST /process` - Start transcription job
175
- - `GET /status/{job_id}` - Check job progress
176
- - `GET /download/{job_id}` - Download generated SRT
177
-
178
- ### Requirements
179
-
180
- - Python 3.8+
181
- - FFmpeg
182
- - PyTorch
183
- - OpenAI Whisper
184
- - FastAPI (for web server)
185
- - Gradio (for HF Spaces)
186
-
187
- ## 💡 Tips for Creators
188
-
189
- ### Video Editing Workflow
190
-
191
- 1. Generate SRT using OneWord AI
192
- 2. Import into your editor:
193
- - **CapCut**: Text → Local Captions → Upload
194
- - **VN Editor**: Text → SRT → Import
195
- - **Premiere Pro**: File → Import → Captions
196
- 3. Apply animations (Pop, Spring, Bounce)
197
- 4. Customize colors and fonts
198
-
199
- ### Best Practices
200
-
201
- - Use **Tiny** model for quick drafts
202
- - Use **Base** model for production (best balance)
203
- - Use **Small** model for technical/complex content
204
- - **One Word** mode works best for 30-60 sec reels
205
- - Enable language selection for multilingual content
206
-
207
- ## 🤝 Contributing
208
-
209
- Contributions welcome! Open an issue or submit a PR.
210
-
211
- Ideas for improvements:
212
- - Auto-capitalization for emphasis
213
- - Color-coded keywords
214
- - Export with burned-in subtitles
215
- - Batch processing multiple files
216
-
217
- ## 📜 License
218
-
219
- MIT License - see [license.txt](license.txt)
220
-
221
- ## 🤝 Credits
222
-
223
- - [OpenAI Whisper](https://github.com/openai/whisper) - Speech recognition
224
- - [FastAPI](https://fastapi.tiangolo.com/) - Backend framework
225
- - [Gradio](https://gradio.app/) - ML web interfaces
226
-
227
- Built with ❤️ by [Ambrish](https://github.com/ambrish-yadav)
228
-
229
- Follow for updates: [@ambrish.yadav.1](https://instagram.com/ambrish.yadav.1)
230
-
231
- ---
232
-
233
- <div align="center">
234
-
235
- ⭐ Star this repo if you find it useful!
236
-
237
- </div>