Skip to content
machinewrapped edited this page Mar 2, 2024 · 9 revisions

GUI-Subtrans

The most effective and efficient way to use GPT-Subtrans is with the GUI. Once installed (see readme) opening the GUI should just be a question of running the gui-subtrans command or shell script, depending on your platform.

Main Window

GUI v0 6 0 Main Window with options

Toolbar

The main toolbar provides access to the basic functionality, which is all that's required for the most straightforward use cases:

  1. Load - this will open a dialog where you can select an SRT file to translate, or a .subtrans project that was previously created from an SRT. A new project is created automatically if the subtrans file does not exist.

  2. Save - the project file and translated subtitles are updated automatically after most operations, but if there is a need to save manually you can do it with this. Holding shift will open a dialog to select a different filename for the project. Translated subtitles are always saved in the same directory as the project, with the target language appended to the filename.

  3. Start - this will start or resume translating subtitles, processing one batch at a time until the translation is complete. Any batches that had errors will be retried.

  4. Fast Forward - will start or resume translating on multiple threads. This can greatly improve the translation speed, but each thread will not be able to access the context from scenes being translated on other threads so it can reduce the quality of the translation.

  5. Stop - this will terminate the current job queue.

  6. Settings - various settings for the application, e.g. for communicating with the translation service.

  7. Quit - bye bye.

Project View

GUI v0 6 0 Project View (Dark Theme)

Once a project has been opened or created the central portion of the window will be populated with the views and tools that enable translation.

Project Toolbar

Only one button, which hides or shows the project settings.

Project Settings

When a new project is opened a panel is automatically displayed prompting for information about the project. It's recommended to at least fill in the name of the movie and the target language. Adding further information like a synopsis and name list can help the AI translator improve the quality of the translation by providing context for the dialog, but the effectiveness depends on the model being used.

The most important information is the instructions for the translator, which can be edited in a separate window. For most translations the default instructions should be effective, but you can customise them for a specific project if it has more specific requirements. You can save custom instructions for use in other projects. GUI v0 6 0 Edit Instructions

The substitution list can be used to force words in either the source or the translation to be replaced. The expected format is a list of replace this##with that pairs.

Project settings can be copied in their entirety from another project (excluding model/provider), which can save time if you are translating multiple related subtitles such as episodes of a TV series.

Scenes and Batches

The next column shows a list of scenes and batches, sorted as a tree. Selecting a scene will automatically expand it to show the batches, and display the subtitles and translations for that scene.

Subtitles are automatically batched when an SRT file is loaded. One of the main reasons for developing the GUI was to allow more user control over the batching. The number and size of batches that is appropriate depends on the project, and in particular on the AI model being used as a translator. In general aim for around 10 scenes and batches of less than 80 lines for a 16K token model or 30 lines for a 4K model.

Scenes and batches that have not been fully translated have a darker header, whilst scenes or batches that had an error during translation will be highlighted in red. GUI v0 6 0 Batch View

Double-clicking a scene or batch brings up a dialog where the summary can be edited. An accurate summary can improve the quality of (re)translation, which feeds forward to subsequent scenes and batches.

GUI v0 2 1 Batch Editor

Subtitles view

Each subtitle is shown along with its matching translation. Double-clicking a subtitle (either original or translated) will bring up an editor where both the original and translated text can be edited.

Selection view

Some useful functionality is found at the bottom the subtitle view, with a number of options that are offered dynamically depending on the current selection.

Individual scenes, batches or lines can be translated and batches or scenes can be merged. Individual lines can be merged, which can be helpful when a single sentence is split across multiple lines, as this often gives the AI trouble in producing an equivalent split in the translation.

Log Window

Various updates about completed or ongoing operations will be displayed here, colour coded for INFO/WARNING/ERROR messages (or verbose DEBUG if enabled).

Status Bar

Brief messages regarding the app's most recent activity.

Settings Dialog

GUI v0 6 0 Settings

Settings are grouped into 3 sections: general application-wide settings, provider-specific settings and some more advanced options for tweaking aspects of the program's behaviour. Some of these are default values that can be changed when a new project is created.

Provider settings are dynamic and will change depending on the selected provider and model. Information is also displayed dynamically to help you configure your chosen provider correctly. GUI v0 6 0 Settings (Provider - OpenAI)

New Project Dialog

GUI v0 6 0 New Project Settings

When an .srt file is opened for the first time a project file is created to hold settings and other information across sessions, and a dialog is shown giving you the chance to set options that are appropriate for this project. Take note of the scene threshold and batch size in particular, as subtitles are batched when the project is created and this cannot currently be redone without creating a new project.

Setting a threshold that produces around 10 scenes is usually a good rule of thumb for a movie, whilst the maximum batch size should take into account the AI model you want to use as a translator.

There isn't a correct answer for the size as it depends on the content of the subtitles, but empirically speaking these work well:

  • gpt-3.5-turbo : 30 lines
  • gpt-3.5-turbo-16k : 60-120 lines (larger batches are much more likely to have desyncs)
  • gpt-3.5-turbo-0125: 60-80 lines (this is a 16K model, but the chance of desyncs is much higher with larger batch sizes)
  • gpt-4 : 60-70 lines (despite the large context size this model is limited to 4K output tokens)
  • gemini 1.0 pro : 60-80 lines (the main limit is the likelihood of errors in larger batches)

Consult the README for more information about the settings.