meta-speech-framework: rework voiceagent configuration 90/22690/1
authorScott Murray <scott.murray@konsulko.com>
Wed, 16 Oct 2019 00:37:40 +0000 (20:37 -0400)
committerScott Murray <scott.murray@konsulko.com>
Wed, 16 Oct 2019 00:37:40 +0000 (20:37 -0400)
After agl-service-voice-high rework to make the voiceagent(s) used
externally configurable, replace the previous virtual/voiceagent
PREFERRED_RPROVIDER scheme with a virtual/voice-high-config that
just selects the appropriate configuration package based on the
specified feature. If agl-speech-framework is specified on its own,
a default configuration file specifying no default voiceagent will
be installed. If agl-voiceagent-alexa is specified, the default
configuration will specify the Alexa voiceagent as the default.
Recipes have been added for the new configuration file packages,
and the alexa-voiceagent-service recipe has been tweaked to create
a package with the Alexa per-voiceagent configuration file and add
it as a dependency.

Bug-AGL: SPEC-2898

Change-Id: Ib6e3952d04df5795d94bb38cd314b0c79e5b60e5
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
meta-speech-framework/conf/include/agl-speech-framework.inc
meta-speech-framework/conf/include/agl-voiceagent-alexa.inc
meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voice-high-config/voice-high.json [new file with mode: 0644]
meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voice-high-config_1.0.bb [new file with mode: 0644]
meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/alexa.json [new file with mode: 0644]
meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb
meta-speech-framework/meta-aac/recipes-platform/packagegroups/packagegroup-agl-core-services.bbappend [new file with mode: 0644]
meta-speech-framework/recipes-apis/agl-service-voice-high/default-voice-high-config/voice-high.json [new file with mode: 0644]
meta-speech-framework/recipes-apis/agl-service-voice-high/default-voice-high-config_1.0.bb [new file with mode: 0644]
meta-speech-framework/recipes-platform/packagegroups/packagegroup-agl-core-services.bbappend

index 9b7a0f0..ee19d25 100644 (file)
@@ -1,2 +1 @@
-# Currently no default voiceagent
-PREFERRED_RPROVIDER_virtual/voiceagent ?= ""
+PREFERRED_RPROVIDER_virtual/voice-high-config = "default-voice-high-config"
index ad509d1..7b47847 100644 (file)
@@ -3,4 +3,4 @@
 # agl-voiceagent-alexa is configured.
 BBMASK += "meta-aac/recipes-support/curl/curl_%.bbappend"
 
-PREFERRED_RPROVIDER_virtual/voiceagent = "alexa-voiceagent-service"
+PREFERRED_RPROVIDER_virtual/voice-high-config = "alexa-voice-high-config"
diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voice-high-config/voice-high.json b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voice-high-config/voice-high.json
new file mode 100644 (file)
index 0000000..f460ccf
--- /dev/null
@@ -0,0 +1 @@
+{ "default": "VA-001" }
diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voice-high-config_1.0.bb b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voice-high-config_1.0.bb
new file mode 100644 (file)
index 0000000..736a7ce
--- /dev/null
@@ -0,0 +1,20 @@
+SUMMARY = "High level voice service binding default voiceagent configuration for Alexa"
+DESCRIPTION = "Alexa default voiceagent JSON configuration file for agl-service-voice-high binding"
+HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/agl-service-voice-high"
+SECTION = "apps"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+SRC_URI = "file://voice-high.json"
+
+inherit allarch
+
+do_compile[noexec] = "1"
+
+do_install () {
+    install -D -m 644 ${WORKDIR}/voice-high.json ${D}${sysconfdir}/xdg/AGL/voice-high.json
+}
+
+RPROVIDES_${PN} += "virtual/voice-high-config"
+
diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/alexa.json b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/alexa.json
new file mode 100644 (file)
index 0000000..4891801
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "id": "VA-001",
+  "active": true,
+  "name": "Alexa",
+  "api": "alexa-voiceagent",
+  "wakewords": [
+    "alexa",
+    "computer",
+    "echo"
+  ],
+  "activewakeword": "alexa",
+  "description": "Alexa voice assistant by Amazon.",
+  "vendor": "Amazon.com Services Inc"
+}
index 92b54e2..939a631 100644 (file)
@@ -20,6 +20,7 @@ DEPENDS = " \
 "
 
 SRC_URI = "git://github.com/alexa/alexa-auto-sdk.git;protocol=https;branch=2.0 \
+           file://alexa.json \
            file://0001-remove-library-dependency-copying.patch \
            file://0002-update-config.xml.in.patch \
            file://0003-update-audio-device-configuration.patch \
@@ -38,8 +39,14 @@ EXTRA_OECMAKE += "-DAAC_HOME=${RECIPE_SYSROOT}/${AAC_PREFIX}"
 # README.md in alexa-auto-sdk upstream as of version 2.0.
 EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Debug"
 
+do_install_append() {
+    install -D -m 0644 ${WORKDIR}/alexa.json ${D}${sysconfdir}/xdg/AGL/voiceagents/alexa.json
+}
+
+PACKAGES =+ "${PN}-conf"
+
+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"
-
-RPROVIDES_${PN} += "virtual/voiceagent"
+RDEPENDS_${PN} += "libcurl libopus libsqlite3 ${PN}-conf"
diff --git a/meta-speech-framework/meta-aac/recipes-platform/packagegroups/packagegroup-agl-core-services.bbappend b/meta-speech-framework/meta-aac/recipes-platform/packagegroups/packagegroup-agl-core-services.bbappend
new file mode 100644 (file)
index 0000000..4b05cea
--- /dev/null
@@ -0,0 +1,3 @@
+RDEPENDS_${PN} += " \
+       alexa-voiceagent-service \
+"
diff --git a/meta-speech-framework/recipes-apis/agl-service-voice-high/default-voice-high-config/voice-high.json b/meta-speech-framework/recipes-apis/agl-service-voice-high/default-voice-high-config/voice-high.json
new file mode 100644 (file)
index 0000000..1b72b8c
--- /dev/null
@@ -0,0 +1 @@
+{ "default": "" }
diff --git a/meta-speech-framework/recipes-apis/agl-service-voice-high/default-voice-high-config_1.0.bb b/meta-speech-framework/recipes-apis/agl-service-voice-high/default-voice-high-config_1.0.bb
new file mode 100644 (file)
index 0000000..b015dd5
--- /dev/null
@@ -0,0 +1,20 @@
+SUMMARY = "High level voice service binding default voiceagent configuration"
+DESCRIPTION = "Default voiceagent JSON configuration file for agl-service-voice-high binding"
+HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/agl-service-voice-high"
+SECTION = "apps"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+SRC_URI = "file://voice-high.json"
+
+inherit allarch
+
+do_compile[noexec] = "1"
+
+do_install () {
+    install -D -m 644 ${WORKDIR}/voice-high.json ${D}${sysconfdir}/xdg/AGL/voice-high.json
+}
+
+RPROVIDES_${PN} += "virtual/voice-high-config"
+
index 42fc5e5..7e91867 100644 (file)
@@ -1,7 +1,5 @@
-# Checking PREFERRED_RPROVIDER_virtual/voiceagent below is less than ideal, but
-# seems required until there is a usable default voiceagent.
 RDEPENDS_${PN} += " \
        agl-service-voice-high \
        agl-service-voice-high-capabilities \
-       ${@oe.utils.conditional("PREFERRED_RPROVIDER_virtual/voiceagent", "", "", "virtual/voiceagent", d)} \
+       ${PREFERRED_RPROVIDER_virtual/voice-high-config} \
 "