diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index e7cbc6d6e580..0f5cdbffbe49 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -60,7 +60,7 @@ jobs: pip install ./test/end2end/skill-ovos-fallback-unknownv1 pip install ./test/end2end/skill-converse_test pip install ./test/end2end/skill-ovos-schedule - pip install git+https://github.com/OpenVoiceOS/ovos-utils@troubleshoot + pip install git+https://github.com/OpenVoiceOS/ovos-utils - name: Run unittests run: | pytest --cov=ovos_core --cov-report xml test/unittests @@ -92,4 +92,4 @@ jobs: files: ./coverage.xml,!./cache flags: unittests name: codecov-umbrella - verbose: true \ No newline at end of file + verbose: true diff --git a/ovos_core/intent_services/__init__.py b/ovos_core/intent_services/__init__.py index 0386c30dcdb4..205c093ba78a 100644 --- a/ovos_core/intent_services/__init__.py +++ b/ovos_core/intent_services/__init__.py @@ -180,15 +180,15 @@ def disambiguate_lang(message): 3 - detected_lang -> tagged by transformers (text classification, free form chat) 4 - config lang (or from message.data) """ - sess = SessionManager.get(message) default_lang = get_message_lang(message) + valid_langs = [default_lang] + Configuration().get("secondary_langs", []) lang_keys = ["stt_lang", "request_lang", "detected_lang"] for k in lang_keys: if k in message.context: v = message.context[k] - if v in sess.valid_languages: + if v in valid_langs: if v != default_lang: LOG.info(f"replaced {default_lang} with {k}: {v}") return v diff --git a/test/end2end/session/test_session.py b/test/end2end/session/test_session.py index d90b0b42974e..7bca54fc6e0c 100644 --- a/test/end2end/session/test_session.py +++ b/test/end2end/session/test_session.py @@ -206,7 +206,6 @@ def wait_for_n_messages(n): # test deserialization of payload sess = Session.deserialize(messages[10].data["session_data"]) self.assertEqual(sess.session_id, "default") - self.assertEqual(sess.valid_languages, ["en-us"]) # test that active skills list has been updated self.assertEqual(messages[10].data["session_data"]["active_skills"][0][0], self.skill_id)