字幕翻译
subtitle_translator的Python项目详细描述
google translate api现在不支持免费翻译。因此,这个字幕翻译程序使用mygengo并能够使用终端和mygengo免费帐户翻译字幕,以各种支持的语言翻译字幕。支持的文件格式为UTF-8格式的srt。这个应用程序是用python编写的,脚本translate_subs安装在主shell中。
先决条件
- mygengo不需要安装,因为它是作为依赖项自动安装的。但是,如果出现故障,请手动安装MyGengo
- python 2.6.*或更高版本
- mygengo api registration
获取/下载
git clone git://kevincobain2000@github.com/kevincobain2000/subtitle_translator.git
安装
python setup.py install
安装键
- Register at ^{tt4}$ and installing ^{tt5}$.
- Generate public_key and private_key.
- Make a dir in your home directory like this ^{tt6}$
- Copy and Paste and save in the files ^{tt7}$ and ^{tt8}$, respectively.
- Save the above text files in home directory. Note# Do ^{tt9}$ to find out location of your home directory.
用法
脚本translate_subs已安装并直接调用。
1. translate_subs -i input.srt -f english -t japanese 2. translate_subs -i input.srt -f en -t ja 3. translate_subs -i input.srt -f Eng -t Jap
>>> Output --> Translated file saved to ja-input.srt
支持的语言
sv Swedish id Indonesian pt Portuguese (Europe) es-la Spanish (Latin America) ko Korean ar Arabic fr-ca French (Canada) nl Dutch en English ja Japanese es Spanish (Spain) zh Chinese (Simplified) de German fr French ru Russian it Italian pt-br Portuguese (Brazil)
注意支持的语言是从英语到目标语言,反之亦然
字符集
input.srt文件必须是utf-8编码的。要转换为utf-8,请参见man iconv
帮助
translate_subs -h
联系人
- Home
- Contact Form
- github
- ^{tt16}$