Before Starting the setup
Create a project in the Google's Action Console. Download credentials--->.json file (refer to this doc for creating credentials https://developers.google.com/assistant/sdk/develop/python/config-dev-project-and-account) For Amazon Alexa
Create a security profile for alexa-avs-sample-app if you already have one. Download the "config.json" file.
Clone the git using:https://github.com/vamshiyekbote/Assistants-Pi.git DO NOT RENAME THE CREDENTIALS FILEs Place the Alexa config.json in file in the /home/pi/Assistants-Pi/Alexa directory. Place the Google client_secret.....json file in the /home/pi/ directory.
Prepare the system for installing assistants by updating, upgrading and setting up audio using:
Restart the Pi using:
Make sure that contents of asoundrc match the contents of asound.conf Open a terminal and type:
Open a second terminal and type:
If the contents of .asoundrc are not same as asound.conf, copy the contents from asound.conf to .asoundrc, save using ctrl+x and y
Bonus Script - Test the audio setup using the following code (optional). Dont panic if the test does not go through successfully, proceed with the installation:
Restart the Pi using:
Install the assistant/assistants using the following. This is an interactive script, so just follow the onscreen instructions:
If you get a fatal error: curl/curl.h: No such file or directory that means you need to install curl. In your Terminal enter:
After verification of the assistants, to make them auto start on boot: Open a terminal and run the following commands:
For Alexa:
For Google Assistant:
Authorize Alexa before restarting
Manually Start The Alexa Assistant Double click start.sh file in the /home/pi/Assistants-Pi/Alexa folder and choose to "Execute in the Terminal".
Manually Start The Google Assistant Open a terminal and execute the following:
/home/pi/env/bin/python -u /home/pi/Assistants-Pi/Google-Assistant/src/main.py --project_id 'replace this with the project id '--device_model_id 'replace this with the model id' If you have issues with the Assistants strating on boot, you may have to setup PulseAudio as a system wide service.
I have also faced a similar issue this week. As we are using Raspberry Pi 3 Model, it has only 1 gb of ram memory and some of the object building processes (like [ 93%] Building CXX object Application Utilities/DefaultClient/src/CMakeFiles/DefaultClient.dir/DefaultClient.cpp.o) from recent avs-device-sdk version requires more memory for object building task.
To solve this issue I increased my swap memory size from 100 mb (default) to 1024 mb. After this only, my AVS Build process completed. It is not much efficient, as it takes a lot of time but it is better than a terminated build process.
To increase the swap memory:
Open the terminal, and run
After the second command, dphys-swapfile file will open and you will need to modify
CONF_SWAPSIZE=100
to
CONF_SWAPSIZE=1024
After changing swap size value from 100 to 1024 Press CTRL+O then Enter Key then CTRL+X (To save the changes made in the file)
Then run
Now, reboot or shutdown and start your raspberry pi again and you can see your swap memory size will be increased to 1024 mb (You can check this by running command "free -h" before and after changing the swapsize)
Now, you can run your BUILD AVS process without any error or termination.