This release is a pre-release and may not be stable for production use.
OVOS Bidirectional Translation plugin
This package includes a UtteranceTransformer plugin and a DialogTransformer plugin, they work together to allow OVOS to speak in ANY language
This plugin is still in alpha
Lang support
Refreshser on OVOS language support system
- a default language is defined in mycroft.conf, this is the OVOS primary language
- all skills, TTS, and STT plugins MUST support this language
- extra languages are defined in mycroft.conf, OVOs can also speak these languages
- STT and TTS plugins in use MUST support all these languages
- if installed skills do not support these languages they will be ignored when language is in use
- support can be per intent (partially translated skills supported)
- skills register intents for all the above languages, this list represents the languages OVOS can speak
- each utterance has an assigned language via Session (message.context)
- default lang used if missing
- defined in wake word
- detected in speech (WIP - functional plugins exist)
- default lang from user recognition (idea)
- defined in client application being used (eg, sent from hivemind satellites)
{
// Primary Language
// Code is a BCP-47 identifier (https://tools.ietf.org/html/bcp47), lowercased
"lang": "en-us",
// Secondary languages will also have their resource files loaded into memory
// but intents will only be considered if that lang is tagged with the utterance at STT step
"secondary_langs": []
}
How it works
- (OPTIONAL) the
ovos-bidirectional-utterance-transformerplugin will detect the text language, if it doesn't match the Session language it will "fix" that"verify_lang": truein config- handle use case of a chat platform where users can write in any language (Session may have primary lang wrongly assigned)
- (OPTIONAL) ignore lang detections that are not in the list of native languages (consider false detection)
"ignore_invalid_langs": truein config
- Session is now fixed to detected_lang
- if Session language is not one of the native languages, translate it to the primary language
- OVOS can now understand the utterance
- (OPTIONAL) tell
ovos-bidirectional-dialog-transformerto translate all dialogs to original Session language- if not set OVOS will answer in it's primary language, even if you spoke to it in a different one
"bidirectional": truein config
Language tags are compared by tag distance, the same rule the rest of OVOS applies.
A regional variant counts as one of the native languages, so ar-SA is native when
the system supports ar, and pt-BR is native when the system supports pt-PT.
A macrolanguage member such as arz is a different language and is translated.
Pre Requisites
This plugin assumes you have configured language detection and language translation plugin beforehand
if running in ovos-docker you need this plugin installed in ovos-core and ovos-audio, you also need the translation plugins
Recommend plugins:
- https://github.com/OpenVoiceOS/ovos-translate-plugin-nllb (local)
- https://github.com/OpenVoiceOS/ovos-translate-server-plugin (remote, public server list)
"language": {
"detection_module": "ovos-lang-detect-ngram-lm",
"translation_module": "ovos-translate-plugin-nllb",
"ovos-translate-plugin-nllb": {
"model": "nllb-200_600M_int8"
}
}
Configuration
"utterance_transformers": {
"ovos-utterance-translation-plugin": {
"bidirectional": true,
"verify_lang": false,
"ignore_invalid": true,
"translate_secondary_langs": false
}
},
"dialog_transformers": {
"ovos-dialog-translation-plugin": {}
}
Release files for ovos-bidirectional-translation-plugin 0.1.4a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ovos_bidirectional_translation_plugin-0.1.4a1.tar.gz | 11.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ovos_bidirectional_translation_plugin-0.1.4a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.6 kB
Release files / ovos_bidirectional_translation_plugin-0.1.4a1.tar.gz
| Download URL | ovos_bidirectional_translation_plugin-0.1.4a1.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae4422de0d6b2d7533134b9251f2a189bd2d62bc134f5ea54770e7dbb177227f
|
|
BLAKE2b-256 checksum How to use checksums |
0d608913e00e49ec0784b893c8c37bb255f7fc8bea1bfc29055286698a38f778
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / ovos_bidirectional_translation_plugin-0.1.4a1-py3-none-any.whl
| Download URL | ovos_bidirectional_translation_plugin-0.1.4a1-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44b33edd4374ace621572962f370b8200955feb7497115179a5c40e69e8999a2
|
|
BLAKE2b-256 checksum How to use checksums |
d16a8a79cd0414e884ca64bc83556c92fadfbb85a4ddd24ee1adf4a0b31f2ad3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|