Releases: machinewrapped/gpt-subtrans
Usability improvements and bug fixes
- Full text of batch prompt and response can now be viewed by double-clicking the batch (newly translated projects only)
- Fixed temperature and rate limit settings for all providers
- Maximum summary length setting (default 240 characters)
- Auto-split selected batch action (selects a split point based on gap length and proximity to the midpoint)
- Validation of Gemini responses to handle failed requests
- Try to reestablish Gemini connection if it drops
- Reworked error handling/retry flow
Please note the caveats about Gemini region restrictions
This was a fairly substantial refactor/rewrite under the hood, so please report any issues you encounter in this release.
Support for Google Gemini
This release adds Google Gemini as a translation provider.
Please note that the Gemini API can only be accessed from IP addresses in certain geographic regions at the moment: https://ai.google.dev/available_regions
To use Gemini as a translator you will need an API key. I believe there is a simplified procedure for getting one at https://ai.google.dev/ if you are in a supported region. Alternatively you can set up a project on https://console.cloud.google.com/ and generate an API key. You must ensure that Generative AI is enabled for the project and the key.
Google have only exposed the Gemini 1.0 Pro model via the API at the moment, though you can sign on to a waiting list to access to the new 1.5 Pro. In my tests Gemini 1.0 Pro is comparable to or perhaps a little better than the latest GPT 3.5 model from OpenAI when it comes to subtitle translation, and is basically free to use for this purpose (https://ai.google.dev/pricing).
This will be a pre-release/beta version to encourage testing and exploration. Please drop a note in discussions if you are able to use Gemini and let us know how your experience was, or create an issue if you encounter any problems (other than Gemini not being available in your region).
Note that the readme and the wiki have been thoroughly revised to reflect the changes in v0.6, so if you have any questions it is probably worth checking those to see if they're addressed there.
Update: updated to the latest PySide6 version to hopefully fix some random crashes in the GUI
Update: added default models for each provider for the command line interface. Use -m "model name" to use a different model.
Switch to a provider-based framework
v0.6.0 brings a major architectural overhaul to lay the groundwork for supporting different AI services as translation providers.
This involves changes to how settings are stored and updated, to support provider-specific settings, and the accompanying UI changes. If you have an existing installation your settings should be migrated automatically when you launch the GUI. You will be prompted to set a provider, though there is only one option.
If this is a new install you will be prompted to select a provider on first launch, then taken automatically to the settings page to configure the settings for that provider.
The only provider supported in this release is OpenAI, but it paves the way to add support for other services such as Gemini, Claude and OpenAI-Azure, or even locally hosted models. Spoiler alert: Gemini should be available by the end of the weekend.
If you are maintaining a fork of the project this will likely be a difficult merge as it involved many changes. The project architecture is cleaner now though, so it should be easier to expand and maintain going forward.
The documentation has been thoroughly updated to reflect these and other recent changes.
What's Changed
- Translation providers by @machinewrapped in #128
Full Changelog: v0.5.9...v0.6.0
Restored "model" to project settings
The model used for a project was removed from the project file as a temporary measure in a previous release, so it was not persisted when the project. This release restores it to the project file, and moves it into the top-level project settings (the side panel). It's a bit of a hack to patch the crack until I get a multi-provider version working.
Additionally, the filename for translated subtitles will now add the target language instead of the "-GPT" suffix, e.g. MySubtitles.English.srt.
Also fixed some bugs:
- Fixed overlapping scene and batch widgets in the project tree
- Fixed cropped subtitles after translation if the translation has more lines than the source
- Fixed not knowing where to write the translated subtitles in some circumstances
Note: the usual PyInstaller issues when there is a PySide6 update are preventing the generation of a MacOS build for this release. It should work fine if installed from source.
Full Changelog: v0.5.8...v0.5.9
Visual overhaul, alignment and individual line translation
This version contains a substantial visual overhaul. Original and translated text are now consolidated into a unified widget so that they are always aligned even when only part of the text is translated. Each line now shows the length of the subtitle and the length of the gap before it.
A footer has been added to each scene and batch showing how many lines have been translated. Additionally, individual lines can now be (re)translated by selecting them and using the "Translate Selection" button.
Spacing and margins have been tweaked for visual cohesion and better use of space. Dark mode has new colours.
Fixed preprocessed prompt being saved
This release fixes a bug introduced in the previous release which caused the generic translation prompt to be overwritten with a pre-processed prompt on translation, and saved in the project/settings.
The movie name and language tags should only be populated when the prompt is sent to the translator, and never saved.
Copy project settings from another file
Added the option to copy project-specific settings, including translator instructions, from another project file.
I have removed the "gpt_model" setting from project-specific settings, to make things simpler. The translator will always use the global setting now instead. It may come back in future, since saving the model to use on a per-project basis does make sense.
As a result, the "Translator Settings" button is now "Edit Instructions", since that is its only remaining function.
-
Added a fix to make sure the path for the log file exists before trying to write to it
-
Fix for dark mode drop-downs on Windows (yes, that means they're broken on Mac again, but in a more usable way)
Fixed loading instruction files in packaged builds
Instruction files are now loaded as a resource file, which means the packaged builds can find them again.
The prompt is now automatically updated from the selected instruction file when it changes.
A --debug command line option has been added to the GUI to write full debug logs to the log file.
Fixed parsing blank lines in the "substitutions" section of project settings.
Replaced "characters" with "names"
Replaced the characters section in project options with a more generic names, and adapted the instructions and prompt generation to reflect the change. Characters in older project files should be transferred to the names section automatically.
Note that the base gpt3.5-turbo
models are likely to ignore the provided names completely, but the turbo-instruct
models are somewhat better at recognizing when to use them, and gpt-4
will probably use them correctly and consistently.
v0.5.1
New instructions file format that contains the prompt to use with the instructions.
- Updated instructions files
- In-app editor for retry instructions
- Retain the starting line number for subtitles in the translation
- Don't reindex subtitles when writing the output, to avoid dropping subtitles with overlapping timecodes
- Fix for Merge Batches after Merge Scenes
What's Changed
- Added prompt to instructions file by @machinewrapped in #97
Full Changelog: v0.5.0...v0.5.1