diff options
author | Scott Murray <scott.murray@konsulko.com> | 2019-10-15 19:57:24 -0400 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2019-10-15 19:57:24 -0400 |
commit | d75ca330180e943df28435705d36c9e435759de2 (patch) | |
tree | b61fbf25886d3815b6d3d480512f61ddf3794243 /conf.d | |
parent | 0a7e93d37803ba31b18c7199cb1efc10ec83e0cc (diff) |
Rework to remove Alexa voiceagent dependencies
Changes include:
- The previous somewhat hard-coded Alexa voiceagent configuration in the
app controller definition has been replaced with a scheme that allows
instead specifying voiceagent configuration via the configuration file
/etc/xdg/AGL/voice-high.json, and individual per-voiceagent
configuration via JSON files in the directory
/etc/xdg/AGL/voiceagents. See the updated README.md for more details.
- The new file reading code for the above change was facilitated by
bumping the C++ standard option to 17 (from 11) to allow use of the
new standard library filesystem classes.
- The configured voiceagents' APIs are now loaded dynamically using the
afb_api_require_api call enabled by the recently exposed
platform:apis:auto-ws widget permission. The widget configuration has
been updated to add the permission, and also remove the previously
hard-code dependency on the "alexa-voiceagent" API.
- App controller event hooks are created dynamically for the events from
the configured voiceagents. This is done by calling back into the
app controller API at the appropriate place during initialization,
replacing the previous hard-coding of events from "alexa-voiceagent".
If future use cases require dynamic removal of voiceagents, then this
scheme will need to be revisited, as the app controller API currently
has no provision for removing events.
- The IAFBApi interdace and AFBApiImpl implementation classes have been
extended with additional getApi and requireApi calls to enable the
above changes in a straightforward manner.
Bug-AGL: SPEC-2898
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Iae8b99a6286174510e88d8eeffd51718db64f2f4
Diffstat (limited to 'conf.d')
-rw-r--r-- | conf.d/project/etc/vshl-core-api.json | 32 | ||||
-rw-r--r-- | conf.d/wgt/config.xml.in | 6 |
2 files changed, 3 insertions, 35 deletions
diff --git a/conf.d/project/etc/vshl-core-api.json b/conf.d/project/etc/vshl-core-api.json index f370a32..44d578a 100644 --- a/conf.d/project/etc/vshl-core-api.json +++ b/conf.d/project/etc/vshl-core-api.json @@ -11,25 +11,6 @@ "uid": "loadVoiceAgentsConfig", "info": "Loading the information about voice agents managed by the high level voice service.", "action": "plugin://vshl-core#loadVoiceAgentsConfig", - "args": { - "default": "VA-001", - "agents": [ - { - "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" - } - ] - } }], "plugins": [{ @@ -40,17 +21,6 @@ ] }], - "events": [{ - "uid": "alexa-voiceagent/voice_authstate_event", - "action": "plugin://vshl-core#onAuthStateEvent" - },{ - "uid": "alexa-voiceagent/voice_connectionstate_event", - "action": "plugin://vshl-core#onConnectionStateEvent" - },{ - "uid": "alexa-voiceagent/voice_dialogstate_event", - "action": "plugin://vshl-core#onDialogStateEvent" - }], - "controls": [{ "uid": "startListening", "action": "plugin://vshl-core#startListening" @@ -69,4 +39,4 @@ "privileges": "urn:AGL:permission:vshl-core:voiceagents:public", "action": "plugin://vshl-core#setDefaultVoiceAgent" }] -}
\ No newline at end of file +} diff --git a/conf.d/wgt/config.xml.in b/conf.d/wgt/config.xml.in index 6d0690c..3c0b0a0 100644 --- a/conf.d/wgt/config.xml.in +++ b/conf.d/wgt/config.xml.in @@ -12,11 +12,9 @@ <feature name="urn:AGL:widget:required-binding"> <param name="@WIDGET_ENTRY_POINT@" value="local" /> </feature> - <feature name="urn:AGL:widget:required-api"> - <param name="alexa-voiceagent" value="ws" /> - </feature> <feature name="urn:AGL:widget:required-permission"> <param name="urn:AGL:permission:afm:system:widget:start" value="required" /> <param name="urn:AGL:permission::public:hidden" value="required" /> + <param name="urn:AGL:permission::platform:apis:auto-ws" value="required" /> </feature> -</widget>
\ No newline at end of file +</widget> |