LibreTranslate is an excellent open-source local machine translation project that supports mutual translation between numerous languages. The official website provides installation methods for various platforms, as well as a Docker installation method. However, it does not provide a Windows integrated package; on Windows, you need to use Docker for installation.
I've simply created a Windows integrated package. It's ready to use after extraction and double-clicking. This makes it easier for novice users.
Download the Integrated Package
Integrated package Baidu Netdisk address: https://pan.baidu.com/s/1UN7WL69DA59iKHHtT6h1GQ?pwd=a5ce Integrated package update patch download (changes the model address to the integrated package directory instead of the model C drive home directory): https://pan.baidu.com/s/1yLWpJM8qXJO8sWVnZ_ew-A?pwd=g59m
Download the integrated package from this address. After downloading, extract it to a directory. You will see a 启动.bat
file; double-click to start it. After successful startup, the following image will be displayed.
Note that the first startup will download the translation model online. There are about 92 models, and the download time is relatively long. Please wait patiently.
If the download fails, please set up your system proxy in advance and restart 启动.bat
.
The models downloaded after the integrated package are stored in the user's home directory. Open any folder, delete the content of the address bar, enter the command %userprofile%/.local/share/argos-translate/packages
, and then press Enter. You can see all the downloaded models.
After downloading and overwriting the patch package, the model address will be changed to the models folder in the integrated package directory. You need to download the model again or copy the .local folder to models according to the instructions in the patch package's readme.txt
You need to download first before you can open this directory; otherwise, it will prompt that the directory does not exist.
It comes with a web interface. The default address is http://127.0.0.1:5000
. Open this address in your browser to see the following interface.
The left side is the input area for the original text to be translated, and the right side is the translated result area.
Using the API
After successfully starting by double-clicking 启动.bat
in the previous step, the API can also be used. The API address is http://127.0.0.1:5000/translate
.
The webpage will display a JavaScript code example for using the translation API.
Using it in Video Translation Software
Open your video translation software, click Menu -- Translation Settings -- LibreTranslate, and enter http://127.0.0.1:5000/translate
in the API URL text box in the window. Keep the API KEY blank.