Repolode
argosopentech

argosopentech/argos-translate

Open-source offline translation library for Python, usable as a library, command-line tool, or GUI, built on OpenNMT models.

Open-source alternative to:Google Translate

Stars
6,581
Forks
502
Open issues
165
Last commit
2 months ago

What is it?

Argos Translate is an offline machine translation library written in Python. It uses OpenNMT models, distributed as .argosmodel language packages, so translation runs locally without calling an online service. It can be used from Python code, from the argos-translate and argospm command-line tools, or through a separate GUI application.

When a direct translation pair is not installed, Argos Translate pivots through intermediate languages. For example, with es→en and en→fr packages installed, it can translate es→fr, at some cost in quality. Package indexes can be updated from within the tool, and GPU acceleration is available by setting the ARGOS_DEVICE_TYPE environment variable, which is passed to CTranslate2.

The project also underpins LibreTranslate, and companion libraries add HTML and file translation on top of it.

Key features

  • 01Runs fully offline using downloadable .argosmodel language packages.
  • 02Usable as a Python library, a command-line tool, or a GUI.
  • 03Pivots through intermediate languages when a direct pair is missing.
  • 04Supports GPU acceleration via CTranslate2 with an environment variable.
  • 05Covers dozens of languages, including Chinese, Japanese, Spanish, and French.

Use cases

  • Translating text in applications that must run without sending data to a cloud service.
  • Adding translation to Python scripts or data pipelines via the library API.
  • Running a self-hosted translation backend, such as LibreTranslate, on your own hardware.
  • Translating HTML or files with companion libraries built on Argos Translate.

Quick start

  1. 1

    Install the library from PyPI with pip

    pip install argostranslate
  2. 2

    Update the package index and install a language package (CLI example)

    argospm update
  3. 3

    Install the English to German translation package

    argospm install translate-en_de
  4. 4

    Translate text from English to German

    argos-translate --from en --to de "Hello World!"

Things to know

  • Translation quality for language pairs without a direct model depends on pivoting through intermediate languages, which loses some quality.
  • GPU acceleration requires setting the ARGOS_DEVICE_TYPE environment variable and a compatible setup.

Topics

FAQ

What is argos-translate?
Open-source offline translation library for Python, usable as a library, command-line tool, or GUI, built on OpenNMT models. Argos Translate is an offline machine translation library written in Python. It uses OpenNMT models, distributed as .argosmodel language packages, so translation runs locally without calling an online service. It can be used from Python code, from the argos-translate and argospm command-line tools, or through a separate GUI application.
Is argos-translate free to use? What license does it have?
argos-translate is open source under the MIT license. Check the license terms before using it in commercial products.
Is argos-translate still maintained?
Updated within 6 months. The last commit to argos-translate was on Aug 8, 2026.
What can I use argos-translate for?
Translating text in applications that must run without sending data to a cloud service. Adding translation to Python scripts or data pipelines via the library API. Running a self-hosted translation backend, such as LibreTranslate, on your own hardware. Translating HTML or files with companion libraries built on Argos Translate.
How do I install argos-translate?
Install the library from PyPI with pip: pip install argostranslate Update the package index and install a language package (CLI example): argospm update Install the English to German translation package: argospm install translate-en_de Translate text from English to German: argos-translate --from en --to de "Hello World!"
Where can I get argos-translate?
The source code and installation instructions are on GitHub: https://github.com/argosopentech/argos-translate

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects