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

support ovos-translate-server #182

Closed
mikejgray opened this issue Oct 10, 2023 · 4 comments
Closed

support ovos-translate-server #182

mikejgray opened this issue Oct 10, 2023 · 4 comments

Comments

@mikejgray
Copy link
Contributor

Support for ovos-translate-server-plugin is missing from OVOSLangDetectionFactory's mappings. This caused almost entirely indecipherable failures in some tests in the icanhazdadjokes skill, which had recently been adjusted to us ovos-translate-server, but was silently failing over to Neon's libretranslate plugin. When I removed that plugin from requirements.txt because it was theoretically not needed, all the tests failed.

Adding support for ovos-translate-server means that the joking skill, and any others using OVOSLangDetectionFactory, can start using it.

@NeonDaniel
Copy link
Member

NeonDaniel commented Oct 11, 2023

The mappings in the factory methods are mostly for backwards-compat. This plugin should be loaded if the entrypoint (ovos-translate-plugin-server) is specified in config

Did you see either of these logs?

LOG.warning("`translation_module` not configured")
LOG.error(f'Language Translation plugin {lang_module} not found. Falling back to libretranslate plugin')

@NeonDaniel
Copy link
Member

On another read, the ovos-translate-plugin-server doesn't provide a language detection module, only translation

@JarbasAl
Copy link
Member

JarbasAl commented Oct 11, 2023

On another read, the ovos-translate-plugin-server doesn't provide a language detection module, only translation

indeed, the detection module is not used directly in any major OVOS component, and when used it is optional

translation is the major component we support, for detection the default config points to the very basic lang detector provided by ovos-classifiers, just to ensure something loads if the factory is called, however it is strongly recommended users pick a different lang detector, such as cld3 that runs offline. we just dont want to drag additional dependencies as a default value

note the translation server does support both endpoints, so it would also be valid to get a remote lang detection server list in the plugin, and migrate the official ovos server to use something like cld3 (or better), the official ovos server / nllb docker image is using https://github.com/OpenVoiceOS/lingua-podre/ for language detection

outdated list of plugins here https://openvoiceos.github.io/ovos-technical-manual/lang_plugins/
i think it has all neon plugins and none of ovos plugins

  // Translation plugins
  "language": {
    // default plugin comes bundled with ovos-classifiers
    "detection_module": "ovos-lang-detect-ngram-lm",
    // default uses public servers for nllb
    // https://github.com/OpenVoiceOS/ovos-translate-server
    // https://github.com/OpenVoiceOS/ovos-translate-plugin-nllb
    "translation_module": "ovos-translate-plugin-server"
  }

NeonDaniel added a commit that referenced this issue Oct 11, 2023
Update config handling to special-case `translation_module` and `detection_module`
Abstract default plugins to private variables for better testing/readability
Relates to #182
NeonDaniel added a commit that referenced this issue Oct 11, 2023
Update config handling to special-case `translation_module` and `detection_module`
Abstract default plugins to private variables for better testing/readability
Relates to #182
@JarbasAl
Copy link
Member

fixed by #184

@github-actions github-actions bot mentioned this issue Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants