Bidirectional translation plugin to make OVOS understand any language
Project description
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
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": {}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ovos_bidirectional_translation_plugin-0.1.3a4.tar.gz.
File metadata
- Download URL: ovos_bidirectional_translation_plugin-0.1.3a4.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cfec7e520a5c8fcd6353decc6ce3929cbd98960bc485fc7364f355336b1e472
|
|
| MD5 |
fc27e79bbf6f27dd0e1ab2da629e95cc
|
|
| BLAKE2b-256 |
eb5a1780f581aae05f3ea5d4a0f4edad680c3c9d49e02214ecef932ed237b9c6
|
File details
Details for the file ovos_bidirectional_translation_plugin-0.1.3a4-py3-none-any.whl.
File metadata
- Download URL: ovos_bidirectional_translation_plugin-0.1.3a4-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be284b277bca8f4cc925552bf5ff24cec08804597ae9658ae6ac76de35a44088
|
|
| MD5 |
aa08b2680def6687e821b50121915946
|
|
| BLAKE2b-256 |
26abf3262d1f54caf4e0de8592098345cdc10e2713de073537e5da6d0df6bcae
|