πŸŒ€ LibreTranslate

LibreTranslate is a self-hosted machine translation API powered by the open source Argos Translate library.

LibreTranslate - Free and Open Source Machine Translation API
Free and Open Source Machine Translation API. Self-hosted, offline capable and easy to setup. Run your own API server in just a few minutes.

LibreTranslate (code) is a free and open source machine translation API powered by Argos Translate. The paltform is a self-hosted, customizable alternative to popular translation services like Google Translate.

Instead of relying on proprietary services like Google or Azure, LibreTranslate is powered by the open source Argos Translate library trained with the OpenNMT system.

OpenNMT neural sequence learning (source: https://opennmt.net/)

While LibreTranslate is a great open source alternative for proprietary providers like Google Translate, its accuracy sometimes falters. The API has a feedback endpoint to improve the accuracy of the models.

LibreTranslate Web App (Demo) (source: https://libretranslate.com/)

If you have questions or hit a snag, platform has an active community forum.

🌠 Features

  • Self-hosted - powered by the open source Argos Translate library
  • Offline capable - build and run on your on-premise server without being connected to the internet
  • Easy setup - Run your own API server with Python with just a few lines of setup. Or run with Docker
  • Customizable - to make changes to the code, build from source, and then run the API
  • Available on Mobile - for Android, LibreTranslator is available on the Play Store and in the F-Droid store. For iOS, LiTranslate is available on the App Store.
LibreTranslate Android App (source: https://play.google.com/store/apps/details?id=de.beowulf.libretranslater&pli=1)

πŸ€– As described by AI

(written by AI, edited by humans)

LibreTranslate is an open-source machine translation platform that aims to provide free and accessible translation services to users. It is designed to be a self-hosted alternative to popular machine translation services like Google Translate or Microsoft Translator.

LibreTranslate is powered by the open source Argos Translate library trained with the OpenNMT system and utilizes neural machine translation techniques to translate text between different languages. It supports a wide range of languages and allows users to translate individual words, phrases, or entire documents.

Because LibreTranslate is open-source, users have more control over their translation service and can host their own instances of LibreTranslate rather than relying on third-party services.

The project was created as a response to concerns about privacy, data security, and the limitations of proprietary machine translation systems. By using LibreTranslate, users can have greater transparency and control over their data, as well as the ability to customize the translation system according to their specific needs.

πŸ‘Ÿ Getting Started with LibreTranslate

LibreTranslate is easy to set up, and docker friendly. You can run your own API server with just a few lines of setup!

Run

With Python installed (3.8 or higher is recommended), simply run:

pip install libretranslate
libretranslate [args]

Then open a web browser to http://localhost:5000

Build and Run

To make changes to the code, build from source, and run the API:

git clone https://github.com/LibreTranslate/LibreTranslate
cd LibreTranslate
pip install -e .
libretranslate [args]

# Or
python main.py [args]

Run with Docker

Linux/MacOS:

./run.sh [args]

Windows:

run.bat [args]

Then open a web browser to http://localhost:5000

Build with Docker

docker build -f docker/Dockerfile [--build-arg with_models=true] -t libretranslate .

If you want to run the Docker image in a complete offline environment, you need to add the --build-arg with_models=true parameter. Then the language models are downloaded during the build process of the image. Otherwise these models get downloaded on the first run of the image/container.

Run the built image:

docker run -it -p 5000:5000 libretranslate [args]

Or build and run using docker-compose:

docker-compose up -d --build

See details on setting up in the README.md.

And find the API Docs here.