github machinewrapped/llm-subtrans v1.4.0
Support for SSA/ASS and VTT formats (experimental)

10 hours ago

This is the culmination of a long process to move the project away from depending on the srt library for its internal representation of subtitles, so that we can support different subtitle file formats.

The system now uses a format-agnostic representation internally, with a pluggable architecture for reading and writing specific file formats.

SSA/ASS files are supported using the pysubs2 library. Metadata such as styles and positions is extracted when the file is read, preserved across translation and restored in the output as far as possible. This should mean that translated subtitles retain the same appearance.

VTT uses a custom parser with some support for metadata extraction - VTT is extremely flexible and it isn't reasonably possible to preserve all metadata in the translation, so complex metadata is just passed through the translator to see if it can handle it. YMMV.

It is possible to read one format and write another, but LLM-Subtrans is primarily a translation app so format conversion is not a priority - if you just want to convert a basic .ass file to .srt it should work fine, but if you want to go the other way and manage styles etc. you will need to use a fully featured subtitle editor on the translation.

This is a huge change to the project (arguably a v2.0) so expect there to be bugs in this initial release.

I'm somewhat limited in my ability to test the implementation since I don't normally use .ssa/.ass/.vtt subtitles so I have very few in my library. If you find a case where the translation doesn't match the source file well then please send it to machinewrapped at gmail dot com with a note about what/where the problems are and I'll see if it can be improved!

This feature wouldn't have been possible without the robot army - Claude Code and Codex did much of the heavy lifting, with Gemini and Copilot on code review duty.

Note that if you install the repository from source then you will need to re-run the install script or run a pip install manually (see the readme for details) when you sync to the latest revision, as the installation process has changed and there are new dependencies.

Full Changelog: v1.3.2...v1.4.0

Don't miss a new llm-subtrans release

NewReleases is sending notifications on new releases.