You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A PyQt6-based desktop application for converting Movie XML files to SRT subtitle format with speaker identification and timing controls. Also includes a powerful command-line interface for batch processing and automation.
4
-
5
-
## Features
6
-
7
-
-**XML to SRT Conversion**: Convert Movie XML files containing TTS data to standard SRT subtitle format
8
-
-**Speaker Management**:
9
-
- View and edit speaker names for each subtitle
10
-
- Mass replace speaker names across all subtitles
11
-
- Automatic handling of overlapping speaker dialogue
12
-
-**Timing Controls**:
13
-
- Adjust subtitle timing with frame-based offset
14
-
- Smart subtitle splitting based on word count and sentence boundaries
15
-
- Automatic time distribution based on speaking rate
16
-
-**Dual Interface**:
17
-
- GUI mode with intuitive visual interface
18
-
- Console mode for batch processing and automation
19
-
- Automatic mode detection (console when available, GUI otherwise)
20
-
-**Robust Error Handling**: Comprehensive logging and validation
3
+
GoSubtitle is a PyQt6 desktop application for converting **Wrapper: Offline** Movie XML files (containing TTS entries) into standard SRT subtitle files. It supports both an interactive GUI for editing and a powerful command-line interface for batch processing and automation.
4
+
5
+
## Key Features
6
+
7
+
-**Wrapper: Offline XML to SRT**: Converts Movie XML files with `<sound tts="1">` entries to SRT, preserving speaker names and timing.
✅ **Separation of Concerns**: Extracted business logic into `SubtitleProcessor` class
176
-
✅ **Type Hints**: Added throughout codebase for better type safety
177
-
✅ **Docstrings**: Comprehensive documentation for all classes and methods
178
-
✅ **Logging System**: Proper logging instead of silent exception catching
179
-
✅ **Input Validation**: Robust validation for XML structure and edge cases
180
-
✅ **Path Handling**: Using `pathlib` for cross-platform compatibility
181
-
✅ **Fixed Lambda Bug**: Proper closure handling in event callbacks
182
-
✅ **Tab Order**: Intuitive keyboard navigation through timeline objects
183
-
✅ **Editable Content**: Subtitle text is now editable in the UI
184
-
✅ **Constants**: Properly defined configuration constants
185
-
✅ **Helper Functions**: Useful utilities in `helpers.py`
186
-
✅ **Clean Imports**: Module-level exports in `__init__.py`
99
+
## Configuration
187
100
188
-
### Testing
101
+
-`FPS = 24` (fixed)
102
+
-`DEFAULT_MAX_WORDS_PER_LINE = 10`
103
+
-`DEFAULT_WORDS_PER_SECOND = 2.5`
104
+
-`MIN_SUBTITLE_DURATION = 0.5`
189
105
190
-
Currently no automated tests. Recommended additions:
106
+
## Troubleshooting
191
107
192
-
- Unit tests for `SubtitleProcessor` methods
193
-
- Integration tests for XML parsing
194
-
- UI tests for user interactions
108
+
-**UI not loading**: Ensure the `ui/` directory is accessible.
109
+
-**XML errors**: Validate your Wrapper: Offline XML structure.
110
+
-**Timing issues**: All offsets and durations are in frames at 24 FPS.
111
+
-**Speaker replacements**: Use exact, case-sensitive names.
195
112
196
113
## License
197
114
198
-
This is a personal project. Feel free to use and modify as needed.
115
+
Personal project—use and modify as needed.
199
116
200
117
## Contributing
201
118
202
-
This is a learning project, but suggestions and improvements are welcome!
203
-
204
-
## Troubleshooting
205
-
206
-
**UI files not found**: Make sure you run the application from the project root directory, or the path resolution will work from any directory thanks to `pathlib`.
207
-
208
-
**XML parsing errors**: Ensure your XML file follows the expected format with proper `duration`, `start`, `stop`, `text`, and `voice` elements.
209
-
210
-
**Import errors**: Make sure PyQt6 is installed: `pip install PyQt6`
0 commit comments