Skip to main content

Gpt powered subtitle translation tool.

Project description

gpttsrt

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

名字: gpt_translate_srt -> gpttsrt

使用方法说明

PYPI 安装(推荐)

pip install 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.2.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.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gpttsrt-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 b639fad22d7e5efa1bc280b2a1db9d9fedd369677a62fa85070187d72bed7ffa
MD5 ddd0669b3d58666b1aa992741008ee9e
BLAKE2b-256 aedf57f83918f1aaab0d342b77469b0bcab3de485a3266ee2f6d5138b6a4bdd6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gpttsrt-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7786fcc8b2d38236f63d4e329f85569f0f64a1f922fc8f29dc0133c89af35e6c
MD5 ee2416529ebfba830bfd43cff5261d11
BLAKE2b-256 d6d0084bbf7a7a4c8de57723a6a24ed0033ec02fdb99cc2513decc0986c5fdc7

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