oneword-ai 0.1.0__tar.gz
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.
- oneword_ai-0.1.0/PKG-INFO +237 -0
- oneword_ai-0.1.0/README.md +205 -0
- oneword_ai-0.1.0/license.txt +7 -0
- oneword_ai-0.1.0/oneword_ai.egg-info/PKG-INFO +237 -0
- oneword_ai-0.1.0/oneword_ai.egg-info/SOURCES.txt +18 -0
- oneword_ai-0.1.0/oneword_ai.egg-info/dependency_links.txt +1 -0
- oneword_ai-0.1.0/oneword_ai.egg-info/entry_points.txt +3 -0
- oneword_ai-0.1.0/oneword_ai.egg-info/requires.txt +12 -0
- oneword_ai-0.1.0/oneword_ai.egg-info/top_level.txt +1 -0
- oneword_ai-0.1.0/onewordai/__init__.py +2 -0
- oneword_ai-0.1.0/onewordai/api/__init__.py +1 -0
- oneword_ai-0.1.0/onewordai/api/main.py +262 -0
- oneword_ai-0.1.0/onewordai/cli.py +67 -0
- oneword_ai-0.1.0/onewordai/core/__init__.py +4 -0
- oneword_ai-0.1.0/onewordai/core/engine.py +368 -0
- oneword_ai-0.1.0/onewordai/web/app.js +361 -0
- oneword_ai-0.1.0/onewordai/web/index.html +154 -0
- oneword_ai-0.1.0/onewordai/web/style.css +485 -0
- oneword_ai-0.1.0/pyproject.toml +48 -0
- oneword_ai-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,237 @@
|
|
|
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
|
+
[](https://www.python.org/)
|
|
40
|
+
[](license.txt)
|
|
41
|
+
[](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
|
+
[](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>
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# π¬ OneWord AI - Subtitle Generator
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
**Generate cinematic one-word subtitles from video/audio using Whisper AI**
|
|
6
|
+
|
|
7
|
+
[](https://www.python.org/)
|
|
8
|
+
[](license.txt)
|
|
9
|
+
[](https://github.com/openai/whisper)
|
|
10
|
+
|
|
11
|
+
Perfect for creators making high-energy reels, shorts, and TikToks!
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## β¨ Features
|
|
18
|
+
|
|
19
|
+
- π― **Three Subtitle Modes**: One Word, Two Word Punch, Phrase Mode
|
|
20
|
+
- π **Multi-Language**: Auto-detect or specify (English, Hindi, Urdu, Spanish)
|
|
21
|
+
- π€ **Multiple Models**: Medium, Large, and **Hindi2Hinglish** (Oriserve/Prime) π
|
|
22
|
+
- π¦ **Python Package**: Installable via pip with `oneword-cli` and `oneword-web` commands
|
|
23
|
+
- π» **Local CLI**: Robust command-line tool for batch processing
|
|
24
|
+
- π **Web UI**: Beautiful Neobrutalism-styled web interface
|
|
25
|
+
- βοΈ **Cloud Ready**: Works on Google Colab and Hugging Face Spaces
|
|
26
|
+
- π³ **Docker Support**: Containerized deployment
|
|
27
|
+
|
|
28
|
+
## π Quick Start
|
|
29
|
+
|
|
30
|
+
### Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Clone the repository
|
|
34
|
+
git clone https://github.com/Ambrishyadav-byte/OnewordAI.git
|
|
35
|
+
cd OnewordAI
|
|
36
|
+
|
|
37
|
+
# Install as a package
|
|
38
|
+
pip install -e .
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Prerequisites**: Ensure [FFmpeg](https://ffmpeg.org/) is installed on your system.
|
|
42
|
+
|
|
43
|
+
### Usage
|
|
44
|
+
|
|
45
|
+
#### π₯οΈ CLI (Command Line)
|
|
46
|
+
|
|
47
|
+
See [CLI.md](CLI.md) for full documentation.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Basic usage
|
|
51
|
+
oneword-cli -i video.mp4
|
|
52
|
+
|
|
53
|
+
# Full options
|
|
54
|
+
oneword-cli -i video.mp4 -m medium -lang hi -mode oneword
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### π Web UI
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Start server & open browser
|
|
61
|
+
oneword-web
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Features:
|
|
65
|
+
- Drag & drop file upload
|
|
66
|
+
- Real-time progress tracking
|
|
67
|
+
- Instant SRT download
|
|
68
|
+
- Responsive Neobrutalism design
|
|
69
|
+
|
|
70
|
+
#### βοΈ Google Colab
|
|
71
|
+
|
|
72
|
+
[](https://colab.research.google.com/)
|
|
73
|
+
|
|
74
|
+
1. Open `OneWord_Colab.ipynb` in Colab
|
|
75
|
+
2. Run all cells
|
|
76
|
+
3. Upload your video
|
|
77
|
+
4. Download your SRT!
|
|
78
|
+
|
|
79
|
+
#### π€ Hugging Face Space
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
python app_gradio.py
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Or deploy to Hugging Face Spaces for a hosted version!
|
|
86
|
+
|
|
87
|
+
## π Subtitle Modes
|
|
88
|
+
|
|
89
|
+
| Mode | Description | Use Case |
|
|
90
|
+
|------|-------------|----------|
|
|
91
|
+
| **One Word** | Each word = separate subtitle | High-energy, attention-grabbing content |
|
|
92
|
+
| **Two Word Punch** | Groups of 2 words | Punchy, impactful messaging |
|
|
93
|
+
| **Phrase Mode** | Full sentence segments | Traditional subtitle style |
|
|
94
|
+
|
|
95
|
+
## π¨ Web UI Preview
|
|
96
|
+
|
|
97
|
+
The web interface features a stunning **Neobrutalism** design:
|
|
98
|
+
- Bold black borders
|
|
99
|
+
- Vibrant color palette
|
|
100
|
+
- Sharp shadows
|
|
101
|
+
- Grid background pattern
|
|
102
|
+
- Smooth animations
|
|
103
|
+
|
|
104
|
+
## π³ Docker Deployment
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Build image
|
|
108
|
+
docker build -t oneword-ai .
|
|
109
|
+
|
|
110
|
+
# Run container
|
|
111
|
+
docker run -p 8000:8000 oneword-ai
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## π Project Structure
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
minimalist-one-word-subtitle-generator/
|
|
118
|
+
βββ onewordai/ # Source code (package)
|
|
119
|
+
β βββ core/
|
|
120
|
+
β β βββ __init__.py
|
|
121
|
+
β β βββ engine.py # Core subtitle generation logic
|
|
122
|
+
β βββ api/
|
|
123
|
+
β β βββ __init__.py
|
|
124
|
+
β β βββ main.py # FastAPI backend
|
|
125
|
+
β βββ web/
|
|
126
|
+
β βββ index.html # Web UI
|
|
127
|
+
β βββ style.css # Neobrutalism styles
|
|
128
|
+
β βββ app.js # Frontend logic
|
|
129
|
+
βββ cli.py # CLI interface
|
|
130
|
+
βββ app_gradio.py # Gradio app for HF Spaces
|
|
131
|
+
βββ OneWord_Colab.ipynb # Google Colab notebook
|
|
132
|
+
βββ Dockerfile # Docker configuration
|
|
133
|
+
βββ requirements.txt # Python dependencies
|
|
134
|
+
βββ README.md
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## π οΈ Development
|
|
138
|
+
|
|
139
|
+
### API Endpoints
|
|
140
|
+
|
|
141
|
+
- `POST /upload` - Upload video/audio file
|
|
142
|
+
- `POST /process` - Start transcription job
|
|
143
|
+
- `GET /status/{job_id}` - Check job progress
|
|
144
|
+
- `GET /download/{job_id}` - Download generated SRT
|
|
145
|
+
|
|
146
|
+
### Requirements
|
|
147
|
+
|
|
148
|
+
- Python 3.8+
|
|
149
|
+
- FFmpeg
|
|
150
|
+
- PyTorch
|
|
151
|
+
- OpenAI Whisper
|
|
152
|
+
- FastAPI (for web server)
|
|
153
|
+
- Gradio (for HF Spaces)
|
|
154
|
+
|
|
155
|
+
## π‘ Tips for Creators
|
|
156
|
+
|
|
157
|
+
### Video Editing Workflow
|
|
158
|
+
|
|
159
|
+
1. Generate SRT using OneWord AI
|
|
160
|
+
2. Import into your editor:
|
|
161
|
+
- **CapCut**: Text β Local Captions β Upload
|
|
162
|
+
- **VN Editor**: Text β SRT β Import
|
|
163
|
+
- **Premiere Pro**: File β Import β Captions
|
|
164
|
+
3. Apply animations (Pop, Spring, Bounce)
|
|
165
|
+
4. Customize colors and fonts
|
|
166
|
+
|
|
167
|
+
### Best Practices
|
|
168
|
+
|
|
169
|
+
- Use **Tiny** model for quick drafts
|
|
170
|
+
- Use **Base** model for production (best balance)
|
|
171
|
+
- Use **Small** model for technical/complex content
|
|
172
|
+
- **One Word** mode works best for 30-60 sec reels
|
|
173
|
+
- Enable language selection for multilingual content
|
|
174
|
+
|
|
175
|
+
## π€ Contributing
|
|
176
|
+
|
|
177
|
+
Contributions welcome! Open an issue or submit a PR.
|
|
178
|
+
|
|
179
|
+
Ideas for improvements:
|
|
180
|
+
- Auto-capitalization for emphasis
|
|
181
|
+
- Color-coded keywords
|
|
182
|
+
- Export with burned-in subtitles
|
|
183
|
+
- Batch processing multiple files
|
|
184
|
+
|
|
185
|
+
## π License
|
|
186
|
+
|
|
187
|
+
MIT License - see [license.txt](license.txt)
|
|
188
|
+
|
|
189
|
+
## π€ Credits
|
|
190
|
+
|
|
191
|
+
- [OpenAI Whisper](https://github.com/openai/whisper) - Speech recognition
|
|
192
|
+
- [FastAPI](https://fastapi.tiangolo.com/) - Backend framework
|
|
193
|
+
- [Gradio](https://gradio.app/) - ML web interfaces
|
|
194
|
+
|
|
195
|
+
Built with β€οΈ by [Ambrish](https://github.com/ambrish-yadav)
|
|
196
|
+
|
|
197
|
+
Follow for updates: [@ambrish.yadav.1](https://instagram.com/ambrish.yadav.1)
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
<div align="center">
|
|
202
|
+
|
|
203
|
+
β Star this repo if you find it useful!
|
|
204
|
+
|
|
205
|
+
</div>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2025 Ambrish
|
|
2
|
+
|
|
3
|
+
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:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
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.
|
|
@@ -0,0 +1,237 @@
|
|
|
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
|
+
[](https://www.python.org/)
|
|
40
|
+
[](license.txt)
|
|
41
|
+
[](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
|
+
[](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>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
license.txt
|
|
3
|
+
pyproject.toml
|
|
4
|
+
oneword_ai.egg-info/PKG-INFO
|
|
5
|
+
oneword_ai.egg-info/SOURCES.txt
|
|
6
|
+
oneword_ai.egg-info/dependency_links.txt
|
|
7
|
+
oneword_ai.egg-info/entry_points.txt
|
|
8
|
+
oneword_ai.egg-info/requires.txt
|
|
9
|
+
oneword_ai.egg-info/top_level.txt
|
|
10
|
+
onewordai/__init__.py
|
|
11
|
+
onewordai/cli.py
|
|
12
|
+
onewordai/api/__init__.py
|
|
13
|
+
onewordai/api/main.py
|
|
14
|
+
onewordai/core/__init__.py
|
|
15
|
+
onewordai/core/engine.py
|
|
16
|
+
onewordai/web/app.js
|
|
17
|
+
onewordai/web/index.html
|
|
18
|
+
onewordai/web/style.css
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|