LibreTranslate is an excellent open-source local machine translation project that supports translation between many languages. The official website provides installation methods for various platforms, as well as a Docker installation method, but it does not provide a Windows integration package. On Windows, you need to use Docker for installation.
I've created a simple Windows integration package that can be used by double-clicking after extraction, making it easier for novice users.
Download the Integration Package
Integration Package Baidu Netdisk Address: https://pan.baidu.com/s/1UN7WL69DA59iKHHtT6h1GQ?pwd=a5ce Integration Package Update Patch Download (Changes the model address to the integration package directory instead of the model C drive home directory): https://pan.baidu.com/s/1yLWpJM8qXJO8sWVnZ_ew-A?pwd=g59m
Download the integration package from this address, extract it to a directory, and you will see a 启动.bat
file. Double-click it to start. If it starts successfully, the following image will be displayed.
Note that the first time you start, it will download the translation models online. There are about 92 models, and the download time is relatively long. Please be patient.
If the download fails, please set up your system proxy in advance and restart 启动.bat
.
The downloaded models are stored in the user's home directory. Open any folder, delete the content in the address bar, enter the command %userprofile%/.local/share/argos-translate/packages
and press Enter to see all the downloaded models.
After downloading and overwriting the patch package, the model address will be changed to the models folder under the integration package directory. You need to re-download the models, or view the patch package instructions.txt to copy the .local folder to models.
You need to have a 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 translation 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 in Video Translation Software
Open the 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 empty.