Skip to main content

FastAPI server to host OpenVoiceOS translate plugins as a service

Project description

OpenVoiceOS Translate Server

Turn any OVOS Language plugin into a micro service!

Use with OpenVoiceOS companion plugin

Install

pip install ovos-translate-server

Usage

ovos-translate-server --help
usage: ovos-translate-server [-h] [--tx-engine TX_ENGINE]
                   [--detect-engine DETECT_ENGINE] [--port PORT] [--host HOST]

optional arguments:
  -h, --help            show this help message and exit
  --tx-engine TX_ENGINE
                        translate plugin to be used
  --detect-engine DETECT_ENGINE
                        lang detection plugin to be used
  --port PORT           port number
  --host HOST           host

eg, to use the NLLB plugin for translation, and Lang Classifier Classics for detection

ovos-translate-server --tx-engine ovos-translate-plugin-nllb --detect-engine ovos-lang-detector-classics-plugin

then you can do get requests

  • http://0.0.0.0:9686/translate/en/o meu nome é Casimiro (auto detect source lang)
  • http://0.0.0.0:9686/translate/pt/en/o meu nome é Casimiro (specify source lang)
  • http://0.0.0.0:9686/detect/o meu nome é Casimiro

Docker

you can create easily crete a docker file to serve any plugin

FROM python:3.7

RUN pip3 install ovos-utils==0.0.15
RUN pip3 install ovos-plugin-manager==0.0.4
RUN pip3 install ovos-translate-server==0.0.1

RUN pip3 install {PLUGIN_HERE}

ENTRYPOINT ovos-translate-server --tx-engine {PLUGIN_HERE} --detect-engine {PLUGIN_HERE}

build it

docker build . -t my_ovos_translate_plugin

run it

docker run -p 8080:9686 my_ovos_translate_plugin

Each plugin can provide its own Dockerfile in its repository using ovos-translate-server

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_translate_server-0.1.0a1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_translate_server-0.1.0a1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file ovos_translate_server-0.1.0a1.tar.gz.

File metadata

  • Download URL: ovos_translate_server-0.1.0a1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ovos_translate_server-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 bbdfe80a5df5cadf74a1c62bbeb2c37dde63f8096ea59a62cc89538437d95bd8
MD5 57dc67fe2fb481c188a735b9ed0e6335
BLAKE2b-256 080973d6122edab54e00150a23a1e32663e61b43207f0d23507d54521056a261

See more details on using hashes here.

File details

Details for the file ovos_translate_server-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_translate_server-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 22093bc6dce1e02b4d9637f5206bd6eb60701e9e05b698404446fe373942c297
MD5 142c401d82a78322c0e0551e83b2e4b7
BLAKE2b-256 d9936e5609b890a122cd5e6aef441dfce143477afd7a08dd04e81aec14062120

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page