Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

PotPlayer Anime TTS Cleaner

Platform Python UI

PotPlayer Anime TTS Cleaner creates a speech-friendly subtitle track for anime whose styled subtitles overlap on screen. This prevents PotPlayer's text-to-speech feature from reading an older line again when a new line appears.

The original video and subtitle tracks are never modified. The app writes a separate file beside the source:

Episode 01.mkv
Episode 01.tts.srt

Why this is useful

Anime subtitles often keep one character's line at the top of the screen while another character begins speaking at the bottom. PotPlayer can treat the full active subtitle block as new text and repeat the first line through TTS.

This tool:

  • detects old-plus-new subtitle timing overlaps;
  • recommends whether conversion is likely to help;
  • ends older cues just before the next line begins;
  • combines lines that begin at nearly the same time;
  • removes ASS styling and drawing commands from spoken text;
  • supports embedded subtitle-track selection;
  • opens the video in PotPlayer with the cleaned subtitle loaded.

Supported files

Type Formats
Subtitles ASS, SSA, SRT
Video containers MKV, MP4, M4V, MOV, WEBM, AVI

Only text-based embedded subtitles can be processed. Image subtitles such as PGS, VobSub, and DVB subtitles are not supported.

Requirements

  • Windows 10 or 11
  • Python 3.10 or newer
  • FFmpeg and ffprobe on PATH for video input
  • PotPlayer for the one-click playback action

Standalone ASS, SSA, and SRT files do not require FFmpeg.

Installation

git clone https://github.com/BindingOx/PotPlayer-Anime-TTS-Cleaner.git
cd PotPlayer-Anime-TTS-Cleaner
python -m pip install -r requirements.txt

Usage

Double-click Launch.bat, then:

  1. Drop a video or subtitle onto the window.
  2. For a video, select the embedded subtitle track.
  3. Review the overlap analysis:
    • Green: no double-text timing pattern was detected.
    • Yellow: a few overlaps were found; conversion may help.
    • Red: repeated overlaps were found; conversion is recommended.
  4. Click Create TTS Subtitle.
  5. Allow the app to open the video in PotPlayer, or load the generated .tts.srt file manually.

The interface includes a persistent light/dark theme setting.

Command line

python potplayer_tts_fix.py "Episode 01.mkv"
python potplayer_tts_fix.py "Episode 01.ass"
python potplayer_tts_fix.py --stream 3 "Episode 01.mkv"
python potplayer_tts_fix.py --merge-window-ms 80 "Episode 01.ass"

Without --stream, the converter prefers an English, non-signs-only, non-hearing-impaired subtitle track.

How the cleanup works

At every subtitle start time, the converter writes only newly starting text. If older text is still active, its generated cue ends one millisecond before the new cue. Lines starting within the merge window are spoken together once.

The overlap diagnosis is a timing-based heuristic. A detected overlap does not always mean PotPlayer will repeat speech, but it identifies the subtitle structure that commonly causes the issue.

Project files

app_icon.svg              Application icon
Launch.bat                Windows launcher
potplayer_tts_fix.py      Parsing, analysis, and conversion engine
potplayer_tts_gui.py      PySide6 desktop interface
requirements.txt          Python dependency

Safety

  • Source files are read only.
  • Output uses a distinct .tts.srt filename.
  • Conversion does not remux or rewrite the video.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages