Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Generic translation endpoint to replace Customized LibreTranslate #31

Open
NeonDaniel opened this issue Oct 14, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request triage New issue needs review

Comments

@NeonDaniel
Copy link
Member

NeonDaniel commented Oct 14, 2024

Objective

Implement a /translate backend to replace calls currently made to a custom LibreTranslate container.

Initial Implementation Requirements

  • /translate/simple endpoint that accepts text, input_lang, and output_lang. Input lang of None should use lang detection. text may be a single string or a list of strings; return value is a list of strings
  • /translate/detect endpoint that accepts text input and returns lang and languages values with most likely language and optional a list of (lang, conf) tuples
  • /translate/bulk endpoint that accepts inputs (List[str]), input_lang (str) and output_langs (List[str]) and returns a dict of lang to a list of translated strings
  • This must be implemented such that translation plugins are interchangable

Other Considerations

  • This may be implemented in ovos-translate-server, OR here with an accompanying connector to load translation plugins and connect them to the MQ bus
  • Klat currently uses MQ directly to get bulk translations
  • Neon should be updated to use whatever hosted solution this implements by default
@NeonDaniel NeonDaniel added enhancement New feature or request triage New issue needs review labels Oct 14, 2024
@NeonDaniel
Copy link
Member Author

Currently, STT and TTS plugins are hosted independent of HANA. I think that either:

  • Translation plugins are treated the same and we do not add a HANA endpoint for this, with all changes going to ovos-translate-server OR
  • We decide to add equivalent endpoints to HANA (not immediately) that enable STT and TTS plugin access.

The latter option does raise questions about hosting multiple plugins in one backend, but does expose a unified endpoint for all hosted services. Deferring to OVOS server packages means it is less clear where different endpoints exist, but does scale more easily where hosting multiple services is desired.

In any case, the MQ integration Klat uses for translations will likely need to be updated or replaced with an HTTP query

@NeonDaniel
Copy link
Member Author

NeonDaniel commented Oct 14, 2024

Relevant Klat integration changes in LibreTranslate

This also includes an example for how services could be attached to MQ as well as the example inputs from Klat that need to be supported

@NeonDaniel
Copy link
Member Author

Currently, STT and TTS plugins are hosted independent of HANA.

Also worth noting that LLMs hosted by Neon are also similar in that they use vLLM and expose their own endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage New issue needs review
Projects
None yet
Development

No branches or pull requests

2 participants