From fa1d34d099fc99d8c713e1868c95d7e4f7e294ed Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Sun, 29 Dec 2019 19:01:24 -0500 Subject: alexa-voiceagent-service: support building in wakeword engine Add support for building the "amazonlite" wakeword engine into the Alexa voiceagent. A new feature template, agl-voiceagent-alexa-wakeword, is added to pull in the extra layers/recipes from the additional wakeword engine files for the SDK that Amazon provides. The feature pulls in the existing agl-voiceagent-alexa feature as a dependency to simplify configuring a build. The existing patch to work around the Alexa SDK build's use of AAC_PREFIX as prefix for all packages has been updated to handle the pryon-lite wakeword engine library. Bug-AGL: SPEC-3077 Change-Id: I5549ea9000c6713e6becb191f4dcd957ebde18ac Signed-off-by: Scott Murray --- .../0001-remove-library-dependency-copying.patch | 15 ++++++++++++--- .../alexa-voiceagent-service_git.bb | 11 ++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'meta-speech-framework/meta-aac') diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0001-remove-library-dependency-copying.patch b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0001-remove-library-dependency-copying.patch index 7b0141c4..3e45c527 100644 --- a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0001-remove-library-dependency-copying.patch +++ b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0001-remove-library-dependency-copying.patch @@ -9,11 +9,11 @@ Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Scott Murray -diff --git a/platforms/agl/alexa-voiceagent-service/libs/CMakeLists.txt b/platforms/agl/alexa-voiceagent-service/libs/CMakeLists.txt -index 4732e7b..ffc149d 100644 +diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt +index 4732e7b..938e5f3 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt -@@ -70,14 +70,6 @@ add_avs_library(SpeechEncoder ${AAC_HOME}/lib/libSpeechEncoder.so) +@@ -70,22 +70,13 @@ add_avs_library(SpeechEncoder ${AAC_HOME}/lib/libSpeechEncoder.so) add_avs_library(OpusEncoderContext ${AAC_HOME}/lib/libOpusEncoderContext.so) add_avs_library(SpeechSynthesizer ${AAC_HOME}/lib/libSpeechSynthesizer.so) add_avs_library(TemplateRuntime ${AAC_HOME}/lib/libTemplateRuntime.so) @@ -28,3 +28,12 @@ index 4732e7b..ffc149d 100644 add_avs_library(equalizer ${AAC_HOME}/lib/libEqualizer.so) add_avs_library(EqualizerImplementations ${AAC_HOME}/lib/libEqualizerImplementations.so) +-if(EXISTS ${AAC_HOME}/lib/libpryon_lite.so.1.13) ++if(EXISTS ${AAC_HOME}/lib/libAACEAmazonLiteEngine.so) + add_aace_library(AACEAmazonLiteEngine) + add_avs_library(AMAZONLITE ${AAC_HOME}/lib/libAMAZONLITE.so) + add_avs_library(KeywordDetectorProvider ${AAC_HOME}/lib/libKeywordDetectorProvider.so) +- add_avs_library(pryon_lite ${AAC_HOME}/lib/libpryon_lite.so.1.13) + endif() + + if(EXISTS ${AAC_HOME}/lib/libAACEGStreamerEngine.so) diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb index 40a9185d..2ddfaa4b 100644 --- a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb +++ b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb @@ -17,6 +17,7 @@ DEPENDS = " \ aac-module-navigation \ aac-module-phone-control \ aac-module-gstreamer \ + ${@bb.utils.contains("ALEXA_WAKEWORD", "true", "aac-module-amazonlite pryon-lite", "", d)} \ " SRC_URI = "git://github.com/alexa/alexa-auto-sdk.git;protocol=https;branch=2.0 \ @@ -36,6 +37,8 @@ inherit cmake aglwgt EXTRA_OECMAKE += "-DAAC_HOME=${RECIPE_SYSROOT}/${AAC_PREFIX}" +ALEXA_WAKEWORD ??= "false" + do_install_append() { install -D -m 0644 ${WORKDIR}/alexa.json ${D}${sysconfdir}/xdg/AGL/voiceagents/alexa.json } @@ -46,4 +49,10 @@ FILES_${PN}-conf = "${sysconfdir}/xdg/AGL/voiceagents/*" # NOTE: curl and opus are from the base SDK libraries, sqlite3 from the # core module -RDEPENDS_${PN} += "libcurl libopus libsqlite3 ${PN}-conf" +RDEPENDS_${PN} += " \ + libcurl \ + libopus \ + libsqlite3 \ + ${PN}-conf \ + ${@bb.utils.contains("ALEXA_WAKEWORD", "true", "pryon-lite", "", d)} \ +" -- cgit 1.2.3-korg