LibreTranslate is an excellent open-source local machine translation project that supports translations between many languages. The official website provides installation methods for various platforms, including Docker. However, it doesn't offer a Windows integrated package, so Docker installation is required on Windows.
Here's a simple Windows integrated package for easy use by beginners. Just unzip and double-click to run!
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 package directory instead of the model's C drive home directory): https://pan.baidu.com/s/1yLWpJM8qXJO8sWVnZ_ew-A?pwd=g59m
Download the integrated package from the provided address, unzip it to a directory. You'll find a 启动.bat
(start.bat) file. Double-click it to start. Upon successful startup, you will see the following image:
Note that the translation models will be downloaded online during the first startup. There are about 92 models, and the download process may take a long time. Please be patient.
If the download fails, please configure 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. You will see all the downloaded models.
After downloading and overwriting the patch, the model address will be changed to the models
folder in the integrated package directory. You need to re-download the models, or check the instructions in patch instructions.txt
to copy the .local
folder to the models
folder.
The directory can only be opened after a download has occurred; otherwise, a "directory does not exist" message will appear.
A web interface is included, with the default address 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 启动.bat
in the previous step, the API can be used. The API address is http://127.0.0.1:5000/translate
.
The webpage will display JavaScript code examples for using the translation API.
Using in Video Translation Software
Open the video translation software, click on the menu -- Translation Settings -- LibreTranslate. In the API URL text box in the window, enter http://127.0.0.1:5000/translate
. Keep the API KEY empty.