Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The build instructions are mentioned by taking RaspberryPi as an example but should be almost similar for other platforms.

...

Getting the source code

Code Block
1. Initialize and download the code base
 - Example for RaspberryPi:
 $ repo init -u https://code.rdkcentral.com/r/manifests -m rdkv-nosrc.xml -b thunder-next
 $ repo sync

2. Download the meta-rdk-voice layer in project root
 $ git clone https://code.rdkcentral.com/r/components/generic/rdk-oe/meta-rdk-voice

3. Enable the below DISTRO feature to build AVS plugin
 $ vi meta-rdk-voice/conf/layer.conf
 - enable the below commented line
 #DISTRO_FEATURES_append = " alexa-plugin"

4. Optionally ifFor wantedthe toexternal usesource MICbuilds based(such implementationas (Ignoresome ifBroadcom usingplatforms) BLEadd voicebelow remote)
line $ vi meta-rdk-voice/conf/layerin manifest/auto.conf
 - enable the below commented line
 #DISTRO_FEATURES_append = " alexa_ffv"
In <Manifest>.xml
   <project name="components/generic/avs/alexa_skill_mapper" revision="rdk-next"/>
 - FollowIn the section (Enable Keyword Detector) for using amazon provided KWD

 # Please follow the steps mentioned in section #3.2 to enable USB audio kernel parameters (Not required for RaspberryPI).

5. Optionally For the external source builds (such as some Broadcom platforms) add below line in manifest/autoauto.conf (where brcmexternalsrc is enabled)
   BRCMEXTERNALSRC_pn-wpe-alexa += "components/generic/avs/alexa_skill_mapper"
   SRCPV_pn-wpe-alexa = "${BRCMEXTERNAL-SRCPV-CMF}"
 $ repo sync

Configuration for voice input from MIC

Mic input can be enable using below options , it will automatically add PORTAUDIO library as dependency.

Code Block
4. if wanted to use MIC based implementation (Ignore if using BLE voice remote)
 $ vi meta-rdk-voice/conf/layer.conf
 - In <Manifest>.xml
   <project name="components/generic/avs/alexa_skill_mapper" revision="rdk-next"/>
 - In auto.conf (where brcmexternalsrc is enabled)
   BRCMEXTERNALSRC_pn-wpe-alexa += "components/generic/avs/alexa_skill_mapper"
   SRCPV_pn-wpe-alexa = "${BRCMEXTERNAL-SRCPV-CMF}"
 $ repo sync
6 .Build the image target
 - Example for RaspberryPi
 $ source meta-cmf-raspberrypi/setup-environment
 ### select meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-thunder-mc.conf ###
 $ bitbake rdk-generic-mediaclient-image

Build instructions to run Alexa as systemd service

enable the below commented line
 #DISTRO_FEATURES_append = " alexa_ffv"

Enable Keyword detector support

Keyword detector (KWD) support enables the device to wake-up & listen to input after receiving the hot word  "Alexa". It is used with devices that has on-board Microphone

Code Block
1. To use pryon lite KWD engine for devices with MIC input
 Note: Source code need to be obtained from amazon separately
2. Set the KWD support flag to "ON"
  $ vi meta-rdk-voice/recipes-wpe/wpeframework/include/avs.inc
    AVS_KWD_SUPPORT ?= "ON"
3. include the KWD detector recipe to build.
 - enable the commented line 
 #PREFERRED_PROVIDER_virtual/alexa-kwd-detector = "pryonlite"
4. Create a bbappend file in platform layer and provide artifact location
e.g. 
 $ vi meta-rdk-oem-<OEMNAME>/meta-<MACHINE>/recipes-avs/pryonlite/pryonlite_2.3.0.bbappend
   SRC_URI  = "file://pryon_lite_2.3.0-metrological-2019.12.23.2344.zip"

Kernel configurations to simulate FFV with an USB microphone

Code Block
# If FFV profile is enabled (DISTRO_FEATURES_
Code Block
1. Initialize and download the code base
 - Example for RaspberryPi:
 $ repo init -u https://code.rdkcentral.com/r/manifests -m rdkv-nosrc.xml -b thunder-next
 $ repo sync

2. Download the meta-rdk-voice layer in project root
 $ git clone https://code.rdkcentral.com/r/components/generic/rdk-oe/meta-rdk-voice

3. Optionally if wanted to use MIC based implementation (Ignore if using BLE voice remote)
 $ vi meta-rdk-voice/conf/layer.conf
 - enable the below commented line
 #DISTRO_FEATURES_append = " alexa_ffv"

 # Please follow the steps mentioned in section #3.2 to enable USB audio kernel parameters (Not required for RaspberryPI).

4. Optionally For the external source builds (such as some Broadcom platforms) add below line in manifest/auto.conf
 - In <Manifest>.xml
   <project name="components/generic/avs/alexa_skill_mapper" revision="rdk-next"/>
 - In auto.conf (where brcmexternalsrc is enabled)
   BRCMEXTERNALSRC_pn-wpe-alexa += "components/generic/avs/alexa_skill_mapper:git/VoiceToApps"
   SRCPV_pn-wpe-alexa = "${BRCMEXTERNAL-SRCPV-CMF}"
 $ repo sync
5 .Build the image target
 - Example for RaspberryPi
 $ source meta-cmf-raspberrypi/setup-environment
 ### select meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-thunder-mc.conf ###
 $ bitbake rdk-generic-mediaclient-image

Enable Keyword detector support

Code Block
1. To use pryon lite KWD engine for devices with MIC input
 Note: Source code need to be obtained from amazon separately
2. Set the KWD support flag to "ON"
  $ vi meta-rdk-voice/recipes-wpe/wpeframework/include/avs.inc
    AVS_KWD_SUPPORT ?= "ON"
3. include the KWD detector recipe to build.
 - enable the commented line 
 #PREFERRED_PROVIDER_virtual/alexa-kwd-detector = "pryonlite"
4. Create a bbappend file in platform layer and provide artifact location
e.g. 
 $ vi meta-rdk-oem-<OEMNAME>/meta-<MACHINE>/recipes-avs/pryonlite/pryonlite_2.3.0.bbappend
   SRC_URI  = "file://pryon_lite_2.3.0-metrological-2019.12.23.2344.zip"

Kernel configurations to simulate FFV with an USB microphone

Code Block
# If FFV profile is enabled (DISTRO_FEATURES_append = " alexa_ffv") & we want to simulate audio input using a USB mic the below kernel configuration need to be enabled for the platforms:

CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_USB_AUDIO=m

# After enabling the above kernel configs, recompile the kernel so that the support for USB audio will be enabled

Enable Alexa Smart Screen support

Code Block
$ vi meta-rdk-voice/conf/layer.conf
 - enable the below commented DISTRO_FEATURE
  #DISTRO_FEATURES_append = " alexa_smart_screen"

Enable Voice chrome

Code Block
1. Enable DISTRO options
$ vi meta-rdk-voice/conf/layer.conf
 - enable the below commented DISTRO_FEATURE
  #DISTRO_FEATURES_append = " voice-chrome"
2. Provide artifact location
 - Add an .bbappend file for alexa-ss-sdk and over-write the SRC_URI
e.g.
 $ vi meta-rdk-oem-OEMNAME/meta-<MACHINE>/recipes-avs/alexa-smart-screen/alexa-ss-sdk_git.bbappend
   SRC_URI_remove = "https://operator-artifact-url.com/location/SmartScreenSDKVoiceChrome-2.1.tar;name=voicechrome;subdir=voicechrome"
   SRC_URI += "file://SmartScreenSDKVoiceChrome-2.1.tar;name=voicechrome;subdir=voicechrome"

How to run the service

...

) & we want to simulate audio input
  using a USB mic the below kernel configuration need to be enabled for the platforms:

CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_USB_AUDIO=m

# After enabling the above kernel configs, recompile the kernel so that the support for USB audio will be enabled

Smart Screen build configuration

Enable Alexa Smart Screen support

Smart screen support will build the components that provide visual experience along with voice response.

Code Block
$ vi meta-rdk-voice/conf/layer.conf
 - enable the below commented DISTRO_FEATURE
  #DISTRO_FEATURES_append = " alexa_smart_screen"

Enable Voice chrome

Voice chrome is a feature that is used along with Alexa smart screen. it provides a animated visual element to notify different Alexa states such as Listening, Thinking or Speaking. When the system is IDLE the voice chrome UI element is cleared from screen. 

Code Block
1. Enable DISTRO options
$ vi meta-rdk-voice/conf/layer.conf
 - enable the below commented DISTRO_FEATURE
  #DISTRO_FEATURES_append = " voice-chrome"
2. Provide artifact location
 - Add an .bbappend file for alexa-ss-sdk and over-write the SRC_URI
e.g.
 $ vi meta-rdk-oem-OEMNAME/meta-<MACHINE>/recipes-avs/alexa-smart-screen/alexa-ss-sdk_git.bbappend
   SRC_URI_remove = "https://operator-artifact-url.com/location/SmartScreenSDKVoiceChrome-2.1.tar;name=voicechrome;subdir=voicechrome"
   SRC_URI += "file://SmartScreenSDKVoiceChrome-2.1.tar;name=voicechrome;subdir=voicechrome"

Build the image

Code Block
Build the image target
 - Example for RaspberryPi
 $ source meta-cmf-raspberrypi/setup-environment
 ### select meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-thunder-mc.conf ###
 $ bitbake rdk-generic-mediaclient-image

How to run the service

Activate AVS Plugin

  1.  Go to the controller web UI by typing http://<Device-IP> in a browser
  2. Select the controller option from left pane menu
  3. toggle the AVS option to activate the plugin

...

  1. Using the Tech4Home BLE Remote - Press & hold the mic button → provide the voice input → release the button. (BT voice support is not available with RDK service codebase) 
  2. Using the on-board (or USB) microphone - Wake-up the system with keyword "Alexa" → provide the voice input.

...

At this stage, we can provide voice commands to Alexa.

Alexa Smart Screen

The Alexa Smart Screen SDK extends the AVS Device SDK to support visual display for screen-based Alexa Built-in products that complement Alexa voice responses with rich visual experiences.

The Alexa Smart Screen implementation for RDK involves below components:

  • The Alexa Smart Screen SDK
  • A GUI web app that handles presentation of Alexa visual responses
  • skill mapper which controls the overlay

Below are few screen shots which gives an idea about the smart screen integration for different scenarios:

...

         User : "metro" or "main UI"
         Alexa: speaks back "main UI" & navigation moves back to metro UI main screen

Architecture & Flow diagram

AVS Integration with Video Skill & RDK Services

Image Removed

AVS Integration with custom skills

...

diagram

AVS Integration with Video Skill & RDK Services

Image Added

AVS Integration with custom skills

Image Added

Current Limitations

IssueDescription
Bluetooth voice input

BT voice input support is not yet available with the firebolt/RDK services codebase.

This will be addressed in coming releases once the feature is ready.

Generic search engineGeneric search feature is dependent on operators backend support.

Roadmap

FeatureStatus
Upgrade Alexa SDKs to latest version: ADSDK (1.21), Smart Screen (2.5)Planned in April-21 2021 Sprint
Extending support to 2 new more OEM platformsPlanned for next sprintTBD
Context specific functionalitiesPlanned to support for some apps initially
Multi room MusicOpen

...