From 64889c4c525c4c66fb74dd703a1cbc0375bc405d Mon Sep 17 00:00:00 2001 From: Malik Talha Date: Thu, 2 Nov 2023 03:29:04 +0500 Subject: Update voice agent related recipes Change the SRCURI to use gerrit repos. Update agl-service-voicegent recipe to correctly package all the required content. Add recipe for another en-us vosk model. Add service files for RASA and Voice Agent server. Bug-AGL: SPEC-4906 Change-Id: Ic9f77386ff5c545c2a80433dd538c94bd8763e9e Signed-off-by: Malik Talha --- .../recipes-python/python3-rasa/files/rasa-service.service | 10 ++++++++++ .../recipes-python/python3-rasa/python3-rasa_3.6.4.bb | 11 ++++++++++- .../python3-snips-inference-agl_0.2.0.bb | 5 ++--- .../python3-snips-inference/python3-snips-nlu-utils_0.9.1.bb | 2 +- 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 meta-offline-voice-agent/recipes-python/python3-rasa/files/rasa-service.service (limited to 'meta-offline-voice-agent/recipes-python') diff --git a/meta-offline-voice-agent/recipes-python/python3-rasa/files/rasa-service.service b/meta-offline-voice-agent/recipes-python/python3-rasa/files/rasa-service.service new file mode 100644 index 00000000..7d91032c --- /dev/null +++ b/meta-offline-voice-agent/recipes-python/python3-rasa/files/rasa-service.service @@ -0,0 +1,10 @@ +[Unit] +Description=RASA Service +After=network.target + +[Service] +ExecStart=/usr/bin/rasa run --enable-api -m /usr/share/nlu/rasa/models/ -p 51054 +Restart=always + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/meta-offline-voice-agent/recipes-python/python3-rasa/python3-rasa_3.6.4.bb b/meta-offline-voice-agent/recipes-python/python3-rasa/python3-rasa_3.6.4.bb index 1038fc36..d55e8cbe 100644 --- a/meta-offline-voice-agent/recipes-python/python3-rasa/python3-rasa_3.6.4.bb +++ b/meta-offline-voice-agent/recipes-python/python3-rasa/python3-rasa_3.6.4.bb @@ -6,12 +6,15 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=930bc50f846c55c70b79b78055ae3d9b" PYPI_PACKAGE = "rasa" SRC_URI += " \ + file://rasa-service.service \ file://0001-rasa-remove-group-from-poetry-as-its-not-supported.patch \ " SRC_URI[md5sum] = "7aab346588a3056b54ff783357e4d081" SRC_URI[sha256sum] = "21e57a99bdec8d9f36f7828985c8e3fb3bf3b2c3c94a856d3006e0a68b41a399" -inherit pypi python_poetry_core +inherit pypi python_poetry_core systemd + +SYSTEMD_SERVICE:${PN} = "rasa-service.service" RDEPENDS:${PN} += " \ python3-requests \ @@ -78,4 +81,10 @@ do_install:append() { # it causes conflicts. rm -f ${D}${libdir}/python3.10/site-packages/README.md rm -f ${D}${libdir}/python3.10/site-packages/LICENSE.txt + + # Initialize our service definition + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/rasa-service.service ${D}${systemd_system_unitdir} + fi } diff --git a/meta-offline-voice-agent/recipes-python/python3-snips-inference/python3-snips-inference-agl_0.2.0.bb b/meta-offline-voice-agent/recipes-python/python3-snips-inference/python3-snips-inference-agl_0.2.0.bb index df18ac53..3f993c74 100644 --- a/meta-offline-voice-agent/recipes-python/python3-snips-inference/python3-snips-inference-agl_0.2.0.bb +++ b/meta-offline-voice-agent/recipes-python/python3-snips-inference/python3-snips-inference-agl_0.2.0.bb @@ -4,12 +4,11 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=ecab3ce0771d366e0f8e4ca058eb48e7" SRC_URI += " \ - git://github.com/malik727/snips-inference-agl.git;protocol=https;branch=main \ + git://gerrit.automotivelinux.org/gerrit/src/snips-inference-agl;protocol=https;branch=${AGL_BRANCH} \ " -PV = "0.2.0+git${SRCPV}" +SRCREV = "${AUTOREV}" S = "${WORKDIR}/git" -SRCREV = "6d45b8d814b1937251524dd8a1e8cac0d8cab5de" DEPENDS += " \ python3-setuptools-native \ diff --git a/meta-offline-voice-agent/recipes-python/python3-snips-inference/python3-snips-nlu-utils_0.9.1.bb b/meta-offline-voice-agent/recipes-python/python3-snips-inference/python3-snips-nlu-utils_0.9.1.bb index 491e4633..d0bc55e7 100644 --- a/meta-offline-voice-agent/recipes-python/python3-snips-inference/python3-snips-nlu-utils_0.9.1.bb +++ b/meta-offline-voice-agent/recipes-python/python3-snips-inference/python3-snips-nlu-utils_0.9.1.bb @@ -4,7 +4,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://../LICENSE;md5=fdebc354a9200f9dc847e624d4584ea9" SRC_URI += " \ - git://github.com/malik727/snips-nlu-utils.git;protocol=https;branch=master \ + git://github.com/snipsco/snips-nlu-utils.git;protocol=https;branch=master \ " PV = "0.9.1+git${SRCPV}" -- cgit 1.2.3-korg