From adb00d0f490f1a745c1e0bf0fce9d02833f5fc4a Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Tue, 29 Jun 2021 19:11:52 +0200 Subject: [PATCH] meta-digi: Add Edge TPU Keyphrase Detector example Split each example in a different recipe. https://onedigi.atlassian.net/browse/DEL-7592 Signed-off-by: Arturo Buzarra --- ...amples_git.bb => libedgetpu-camera_git.bb} | 11 ++++--- .../libedgetpu/libedgetpu-keyword_git.bb | 33 +++++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) rename meta-digi-arm/recipes-bsp/libedgetpu/{libedgetpu-examples_git.bb => libedgetpu-camera_git.bb} (67%) create mode 100644 meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-keyword_git.bb diff --git a/meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-examples_git.bb b/meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-camera_git.bb similarity index 67% rename from meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-examples_git.bb rename to meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-camera_git.bb index f505fa88c..eb5ce2ab5 100644 --- a/meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-examples_git.bb +++ b/meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-camera_git.bb @@ -23,12 +23,13 @@ do_configure() { do_install() { # Install Gstreamer examples install -d ${D}/opt/libedgetpu - install -d ${D}/opt/libedgetpu/all_models - install -d ${D}/opt/libedgetpu/gstreamer + install -d ${D}/opt/libedgetpu/camera + install -d ${D}/opt/libedgetpu/camera/all_models + install -d ${D}/opt/libedgetpu/camera/gstreamer rm -f ${S}/gstreamer/install_requirements.sh - install -m 0555 ${S}/all_models/* ${D}/opt/libedgetpu/all_models/ - install -m 0555 ${S}/gstreamer/* ${D}/opt/libedgetpu/gstreamer/ + install -m 0555 ${S}/all_models/* ${D}/opt/libedgetpu/camera/all_models/ + install -m 0555 ${S}/gstreamer/* ${D}/opt/libedgetpu/camera/gstreamer/ } -FILES_${PN} += "/opt/libedgetpu/* \ +FILES_${PN} += "/opt/libedgetpu/camera/* \ " diff --git a/meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-keyword_git.bb b/meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-keyword_git.bb new file mode 100644 index 000000000..7915f82d9 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/libedgetpu/libedgetpu-keyword_git.bb @@ -0,0 +1,33 @@ +SUMMARY = "Edge TPU keyphrase detector" +HOMEPAGE = "https://coral.ai/examples" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRCREV = "43a5fd0578c75c9140b4f057de74f2dbac96ceff" +SRC_URI = "git://github.com/google-coral/project-keyword-spotter.git;protocol=https" + +S = "${WORKDIR}/git" + +RDEPENDS_${PN} = "python3-pycoral \ + python3-pyaudio \ +" + +do_install() { + # Install Gstreamer examples + install -d ${D}/opt/libedgetpu + install -d ${D}/opt/libedgetpu/keyword + install -d ${D}/opt/libedgetpu/keyword/models + install -d ${D}/opt/libedgetpu/keyword/config + + install -m 0555 ${S}/models/* ${D}/opt/libedgetpu/keyword/models/ + install -m 0555 ${S}/run_model.py ${D}/opt/libedgetpu/keyword + install -m 0555 ${S}/mel_features.py ${D}/opt/libedgetpu/keyword + install -m 0555 ${S}/model.py ${D}/opt/libedgetpu/keyword + install -m 0555 ${S}/audio_recorder.py ${D}/opt/libedgetpu/keyword + + install -m 0555 ${S}/config/labels_gc2.raw.txt ${D}/opt/libedgetpu/keyword/config + install -m 0555 ${S}/config/commands_v2.txt ${D}/opt/libedgetpu/keyword/config +} + +FILES_${PN} += "/opt/libedgetpu/keyword/* \ +"