aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md87
1 files changed, 84 insertions, 3 deletions
diff --git a/README.md b/README.md
index c2ad2c9..29360ed 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# 1. High Level Voice Service Core (VSHL-CORE)
+# 1. High Level Voice Service Core (VSHL-CORE)
This repository hosts the code for the AGL's high level voice service's core request arbitration binding also known as VSHL-CORE.
Please refer to the [architecture](https://confluence.automotivelinux.org/display/SPE/Speech+EG+Architecture) for more information.
@@ -14,7 +14,7 @@ pushd $MY_PROJECTS_DIR
git clone --recursive https://gerrit.automotivelinux.org/gerrit/apps/agl-service-voice-high-core
```
-# 4. Renesas R-Car M3 board
+# 4. Renesas R-Car M3/H3 board
## 4.1 Building VSHL Core
```
@@ -34,6 +34,87 @@ popd
# afm-util install vshl-core.wgt
# afm-util start vshl-core@1.0
```
+## 4.3 Voiceagent Configuration
+The binding's voiceagent configuration can be provided in three ways. Via the binding's app controller JSON configuration, the file /etc/xdg/AGL/voice-high.json, or as separate per-voiceagent JSON files in /etc/xdg/AGL/voiceagents/. These will be discussed in the following sections.
+
+### 4.3.1 App Controller Voiceagent Configuration
+The original method of providing per-voiceagent configuration and setting the default voiceagent was via the binding's app-controller JSON configuration, which is located in conf.d/project/etc/vshl-core-api.json in the source tree. This configuration file defines the runtime configuration of the binding used by the app-controller library, and voiceagent configuration was, and still can be, provided via the "args" parameter for the controller's "onload" definition for the "loadVoiceAgentsConfig" entry point in the vshl-core plugin. The original hard-coded configuration for the Alexa voiceagent looked like this:
+```
+"onload": [{
+ "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"
+ }
+ ]
+ }
+}],
+```
+The "args" definition has now been removed in favor of the flexibility provided by the following options, but can still be added back if required for a future use case.
+
+### 4.3.2 /etc/xdg/AGL/voice-high.json
+The file /etc/xdg/AGL/voice-high.json can be considered a replacement for the configuration previously provided in the "args" to "loadVoiceAgentsConfig" in the controller configuration. Its syntax is the same, so the following voice-high.json contents will produce the same final binding configuration:
+```
+{
+ "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"
+ }
+ ]
+}
+```
+The configuration parsing, however, allows omitting the list of voiceagents, so in practice the per-voiceagent configuration files described next would preferably be used with a simpler voice-high.json file that just defines the default voiceagent, e.g.:
+```
+{ "default": "VA-001" }
+```
+Note that the binding does allow operation with no voiceagents as well as no default voiceagent configured. As well, since the voiceagent API specified by name in the "api" field is loaded dynamically, there currently is a constraint that the providing voiceagent binding be running before vshl-core.
+
+### 4.3.3 /etc/xdg/AGL/voiceagents
+The final option for providing just per-voiceagent configuration is to place a JSON file containing its configuration in the directory /etc/xdg/AGL/voiceagents. All readable files in the directory with the .json extension will be read and validated as possible voiceagent configurations. The contents are just the "agents" field of the previous configurations, so for the Alexa voiceagent example above, the JSON would be:
+```
+{
+ "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"
+}
+```
+Note that for conflicting voiceagent definitions with the same "id", the first configuration parsed will be used, and the parsing ordering follows what has been outlined above, i.e. controller JSON configuration, then voice-high.json, then any per-voiceagent configuration JSON files. However, the value of the default voiceagent, if any, provided by the controller JSON configuration, may be over-ridden by the value in voice-high.json.
# 5. Ubuntu 16.04
## 5.1 Building VSHL Core
@@ -92,4 +173,4 @@ It will also give you the option to apply a patch (it creates a patch in /tmp fo
git apply /tmp/<patch>
git add <source files>
git commit
-``` \ No newline at end of file
+```