Amazon Alexa home assistant

With three sensitive microphones, it is possible to recognize speech from a distance of up to 5 meters, which makes it easy to integrate the device with Amazon Alexa, ChatGPT, Google Home, and other voice control systems.


 

In the version with the pan-tilt camera, facial detection and tracking allow for activation with just a glance (without the need to speak wake words like "Alexa" or "OK Google"). An example of this can be seen in the demonstration video (see Camera Pan/Tilt).
 

You can easly setup Amazon Alexa on SaraKIt using prepared repository 

Register an AVS device

Before you can use the SDK, you must register an AVS device on the Amazon developer portal by following the instructions on Register an AVS Product and Create a Security Profile. After registering your device, you download a config.json file. This file contains your client ID and client secret. The client ID and client secret authorize your device to retrieve access tokens from AVS. Your config.json file facilitates the authorization calls between AVS and your device. Save your config.json file somewhere accessible. You need to use it later in this tutorial to build and authorize your instance of the SDK.

Build Amazon Alexa sample

Clone repository to /home/pi/  and go to SaraKIT/Alexa

cd SaraKIT/Alexa

create necesearry directories

mkdir install build && cd build

cmake project

cmake ../AVS
-DGSTREAMER_MEDIA_PLAYER=ON
-DPORTAUDIO=ON
-DPORTAUDIO_LIB_PATH=/home/pi/saraKIT/third-party/portaudio/lib/libportaudio.so
-DPORTAUDIO_INCLUDE_DIR=/home/pi/saraKIT/third-party/portaudio/include
-DPORCUPINE_KEY_WORD_DETECTOR=ON
-DPORCUPINE_KEY_WORD_DETECTOR_LIB_PATH=/home/pi/saraKIT/third-party/porcupine/libpv_porcupine.so
-DPORCUPINE_KEY_WORD_DETECTOR_INCLUDE_DIR=/home/pi/saraKIT/third-party/porcupine/include
-DCMAKE_INSTALL_PREFIX=../install
-DBUILD_TESTING=OFF

make project

make -j4 && make install

Set up your SDK configuration file go to AVS\tools\Install and run 

./genConfig.sh config.json 12345
/home/pi/saraKIT/Alexa/db
/home/pi/saraKIT/Alexa/AVS
/home/pi/saraKIT/Alexa/build/Integration/AlexaClientSDKConfig.json
-DSDK_CONFIG_MANUFACTURER_NAME="saraKIT"
-DSDK_CONFIG_DEVICE_DESCRIPTION="saraKIT"

run sample:

PA_ALSA_PLUGHW=1 ./SampleApp ./AlexaClientSDKConfig.json /home/pi/saraKIT/third-party/porcupine DEBUG9

 

You can find C++ and Python code for Raspberry Pi4 in the
SaraKIT Github repository:
https://github.com/SaraEye