Skip to content

A Python script to translate SubRip (.srt) subtitles using KoboldCPP as the AI backend.

License

Notifications You must be signed in to change notification settings

candre23/KoboTrans

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

KCPP Subtitle Translator

A Python script to translate SubRip (.srt) subtitles using KoboldCPP as the AI backend. This is a quick and dirty hack of https://github.com/passthesh3ll/srt-ai-translator, using gemini and some trial & error instead of actual skill or understanding. Works well with Qwen3 models - may require tweaking for others. Looks for KCPP running locally on port 5001. Modify line 8 if you're using a non-standard port.

Usage

python kobotrans.py <input SRT File> <input language code> <output language code>

So for example, if you wanted to translate the English subtitle file "movie.srt" into Italian, you would use

python kobotrans.py movie.srt eng ita

This will create a translated file "movie_ita.srt"

Available language codes: ISO 639-2 Codes

Dependencies

requests, json, tqdm, os, threading, pycountry, argparse, time, colorama

About

A Python script to translate SubRip (.srt) subtitles using KoboldCPP as the AI backend.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%