Skip to main content

Gpt powered subtitle translation tool.

Project description

gpttsrt

一个使用gpt3.5来批量翻译srt字幕文件的工具,用来批量翻译公开课字幕

名字: gpt_translate_srt -> gpttsrt

使用方法说明

源码安装

clone 本项目到本地

git clone https://github.com/Seeker0472/gpttsrt.git

cd到项目目录

cd gpttsrt

安装

pip install -e .

配置文件

example: gpttsrt.conf

path_in = './input' # 输入文件夹
path_completed = './completed' # 将翻译完成的源文件移动到这个文件夹
path_out = './output' # 输出文件夹
api_key = '' # openai的api key
mirror_url= '' # openai的api url,如果不适用镜像服务就不用填
max_thread = 10 # 最大线程数(同时翻译多个文件,提高速度), 默认为10
line_per_request = 10 # 每次请求翻译的行数, 默认为10

运行

gpttsrt -c --config gpttsrt.conf

TODO

  • 多线程优化翻译速度
  • 优化翻译结果,检测翻译结果是否异常
  • 优化翻译结果,使用gpt给长句断句
  • 优化翻译结果,使用使用whisper模型给断句后的句子标记时间

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpttsrt-0.0.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpttsrt-0.0.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file gpttsrt-0.0.1.tar.gz.

File metadata

  • Download URL: gpttsrt-0.0.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for gpttsrt-0.0.1.tar.gz
Algorithm Hash digest
SHA256 de7448987ca8d4c3c1d0676c1b7f4dca6c2362fd2c2ac7bf69069a78c6535b77
MD5 1e8ff7b9caa2258e8cb2b9d0264b4046
BLAKE2b-256 03173a290881ca2559d2fc1632668e0d256e8855d3280ce6e05ce43bf5a83857

See more details on using hashes here.

File details

Details for the file gpttsrt-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gpttsrt-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for gpttsrt-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17f5a4de23fe36c556ac711b4114d6dbe28d8792b4c47686bbfec13b2fb761e1
MD5 c7111c9e9f22d35fe943e05784da0d7b
BLAKE2b-256 579f9b1c26f0ef0ff6f39acf66de65c7e166bf2a4bba13f1e9a31bc2128e4102

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page