Releases: machinewrapped/gpt-subtrans
Fix for missing context
Fixes an issue where context (e.g. the list of names) was not being passed to the translator.
- Added new Whisper-Experimental instructions, based on the new default instructions, with additional cues that the AI should attempt to identify and fix transcription errors in the source. May make things better, may make things worse - let's find out :-)
New default instructions
The default instructions have been updated for this release - the first significant revision in quite a while, done with some advice from Claude. The new instructions significantly reduce the error rate with Gemini (fewer unreadable responses or summaries getting merged with translations), and with larger batches for all models.
They also work surprisingly well when the source subtitles contain OCR or transcription errors, so consider using them instead of the custom (OCR errors)
or (Whispered)
instructions.
The previous default instructions can still be found as instructions (legacy)
in case you run into problems - please open an issue or comment in the discussions if you find that the new instructions are producing errors or worse results.
Additionally, lines which are empty in the translation are now shown differently to lines that were not translated - this is particularly useful when using "remove filler words", as Whisper often produces lines that are just something like "Eh?" that should not be subtitled.
The simple batcher has been removed - I think the "new" batcher has proven its reliability, I haven't ever felt the need to use the old batcher since it was implemented.
Some additional bug fixes:
- Occasional crashes in the new project settings dialog should finally be fixed
- Fixed project settings being copied across from the open project when starting a new project.
- Fixed target language being blank in the new project settings dialog
Fix for batch preview in new project settings
Fixed a bug introduced in a recent update that meant the pre-processor was always active for batch previews, even if the "pre-process subtitles" option was not selected.
Please see the discussions section for some important notes about Google Gemini.
0.7.5b - very minor update, possibly improves stability for the new project settings dialog in some cases, and includes new (experimental) instructions.
Fix for first-run options
- remember last used directory
Full Changelog: v0.7.2...v0.7.4
Ensure full-width punctuation in Asian script
- Pre/post process option to ensure that punctuation in Asian script that doesn't use whitespace is full-width, ensuring that it works with line breaks/splits.
- Update batcher preview on a background thread in the new project settings dialog.
- A few other bug-fixes.
Full Changelog: v0.7.1...v0.7.2
Remove filler words in pre/post-process
Option to remove filler words such as err, umm, ah in pre- or post-processing steps. Attempts to leave sensible punctuation and capitalization after removing the filler words.
Also includes custom Chinese to English instructions, contributed by yuxi-liu-wired
Full Changelog: v0.7.0...v0.7.1
Optional post-processing of translations
Added an option to run a post-processor on translated subtitles, to attempt to fix some common issues. At the moment the main feature is adding line breaks to long lines, as most provider models do not add them and can even remove them when the source does.
The post-processor can also attempt to normalise dialog markers and split dialog on to separate lines, though this it is more effective to do this in the preprocessor as it helps the AI understand that there is more than one speaker.
Future enhancements could include adjusting the duration of subtitles to ensure a minimum length and/or characters per second rate, and fixing overlapping start/end times. Let me know if there's anything else that would help.
What's Changed
- Added Auto mode for substitutions by @machinewrapped in #166
- Post process translation by @machinewrapped in #168
Full Changelog: v0.6.9...v0.7.0
Optional preprocessing of source subtitles
Adds a system to optionally preprocess input subtitles when they are loaded. This can fix some common issues that make translations less accurate or more error prone. It is particularly useful for subtitles generated with Whisper:
- Split long lines. Attempt to break long lines by splitting at newlines or punctuation, setting the duration of the split sections proportional to their length.
- Attempt to identify dialog markers indicating a change of speaker that are on the same line (common in Chinese subtitles) and add line breaks
- Attempt to ensure that if any lines begin with a dialog marker then all lines do
These functions are inspired by the Fix Common Errors tool in Subtitle Edit, though they work a little differently. More may be added in future - create an issue or discussion if there is something you see regularly that could be fixed automatically.
The preprocess step is not enabled by default, but it can be turned on in the settings dialog (which will add a tab with settings for the preprocessor) or in the new project dialog, so you can see how much difference it makes to the line and batch count.
Fixed parsing translation with a # character
Fixed the regular expression for extracting lines from a translation so that it handles body text with a # character in correctly.
This release has very little user-facing changes but a lot of maintenance under the hood, so please raise an issue if you encounter new and undesirable behaviour.
edit: package updated to fix the application icon
Full Changelog: v0.6.7...v0.6.8
Support for local servers
This version adds a new translation provider, Local Server. It is intended for use with locally hosted AI models, e.g. LM Studio.
Do not expect great results using locally hosted models, the small, quantized models you can find on hugging face and run on consumer hardware are much less capable and prone to errors than the large models hosted by OpenAI, Google etc. They are also comparatively slow. Please report your results, good and bad, in the discussions section to help the community figure out what is possible and what to avoid.
The provider uses the httpx library to make requests so it has no additional dependencies. You must specify the server's address (e.g. http://localhost:1234
) and the endpoint to use (e.g. /v1/chat/completions
). If the endpoint offers a "chat" style interface you should enable "Supports Conversation", and if it allows instructions to be sent as a "system" user you should enable "Support System Messages". Otherwise it is assumed to be a completion endpoint and the prompt will be constructed as a script that needs completing.
The prompt can be customised using a template, which may be useful if the model is trained to expect a specific format. The options are limited though, and you will need to modify code if you need to interface with a model that has more specific requirements.
Although the provider is intended to be used with locally hosted models it will work with any server that offers an OpenAI compatible endpoint, including OpenAI's own. Optional parameters for an API key and model are provided in case they are needed.