Coder Social home page Coder Social logo

shivasiddharth / assistants-pi Goto Github PK

View Code? Open in Web Editor NEW
337.0 45.0 115.0 10.7 MB

Headless Google Assistant and Alexa on Raspberry Pi

Shell 40.05% Python 59.95%
google assistant sdk google-assistant-sdk amazon-alexa assistants-pi raspberry-pi google-assistant alexa-avs-sample-app alexa-voice-service

assistants-pi's Introduction

Assistants-Pi

One installer for both Google Asistant and Amazon Alexa

Simultaneously run Google Assistant and Alexa on Raspberry Pi


If you like the work, find it useful and if you would like to get me a ☕ 😄 paypal


Note:

18/01/2020: Routine update and bug fixes.


Before Starting the setup


For Google Assistant

  1. Create a project in the Google's Action Console.
  2. 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

  1. Create a security profile for alexa-avs-sample-app if you already don't have one.
    https://github.com/alexa/avs-device-sdk/wiki/Create-Security-Profile

  2. Download the "config.json" file.


Setup Amazon Alexa, Google Assistant or Both


  1. Clone the git using:
git clone https://github.com/shivasiddharth/Assistants-Pi  

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.

  1. Make the installers executable using:
sudo chmod +x /home/pi/Assistants-Pi/scripts/prep-system.sh    
sudo chmod +x /home/pi/Assistants-Pi/scripts/audio-test.sh   
sudo chmod +x /home/pi/Assistants-Pi/scripts/installer.sh  
  1. Prepare the system for installing assistants by updating, upgrading and setting up audio using:
sudo /home/pi/Assistants-Pi/scripts/prep-system.sh
  1. Restart the Pi using:
sudo reboot
  1. Make sure that contents of asoundrc match the contents of asound.conf
    Open a terminal and type:
sudo nano /etc/asound.conf

Open a second terminal and type:

sudo nano ~/.asoundrc

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

  1. 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:
sudo /home/pi/Assistants-Pi/scripts/audio-test.sh  
  1. Restart the Pi using:
sudo reboot
  1. Install the assistant/assistants using the following. This is an interactive script, so just follow the onscreen instructions:
sudo /home/pi/Assistants-Pi/scripts/installer.sh  
  1. After verification of the assistants, to make them auto start on boot:

Open a terminal and run the following commands:

sudo chmod +x /home/pi/Assistants-Pi/scripts/service-installer.sh
sudo /home/pi/Assistants-Pi/scripts/service-installer.sh  

For Alexa:

sudo systemctl enable alexa.service  

For Google Assistant:

sudo systemctl enable google-assistant.service  
  1. Authorize Alexa before restarting
sudo /home/pi/Assistants-Pi/Alexa/startsample.sh  

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. For further details refer this git https://github.com/shivasiddharth/PulseAudio-System-Wide

assistants-pi's People

Contributors

adambutler avatar dependabot[bot] avatar grvweb avatar sagarumathe avatar shivasiddharth avatar williamhemmingsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

assistants-pi's Issues

installation issue: PyAudio

Hi,
I started with a new install of Raspbian Stretch full. Followed your YouTube installation procedure. I do have an AIY kit.

I got an error of PyAudio failed due to BDist Wheel issue. As everything is handled by the script, i saw the error and it flew by.
End result is that Alexa worked. Google Assistant didn't. Google Assistant complained the IS_MUTE flag was set and the input device was busy.

So, i decided to install PyAudio using pip

pip install PyAudio.

It went fine but, I guess the whole thing broke after a reboot.

Companion service didn't even start. Once again, the status report complained about input devices being busy.

do you have any idea what is going on?

Did you install with Jesse or Stretch?

V

getting a kodi error?

/home/pi/env/bin/python -u /home/pi/GassistPi/src/main.py --device_model_id .... Traceback (most recent call last): File "/home/pi/GassistPi/src/main.py", line 17, in <module> from kodijson import Kodi, PLAYER_VIDEO ImportError: No module named 'kodijson'

get that error when i run the main.py

Fix java installer for "stretch"

Your alexa-avs-sample-app/samples/javaclient/install-java8.sh script needs to be updated to install java for Raspbian 9 (stretch).

Package missing for Java install

The default Raspbian is missing package "dirmngr". This needs to be installed by install-java8.sh to keep the script from failing.

Alexa Not Starting at Boot

Hi Shiva,

Thank you for your hard work in creating this project.

I have been trying to make google and alexa work together. First I installed Gassitpi, which works flawlessly. Now I have been trying to install Alexa, but running into an error. I was able to follow instructions until very end, but I am getting an error at the last step for wakeword.sh. While executing:
cd wakeWordAgent/src && sudo ./wakeWordAgent -e kitt_ai
I am getting error:
sudo: ./wakeWordAgent: command not found
After this error, I ran remaining commands and rebooted my Pi assuming that things will work. Google assistant boots up but Alexa doesn't. However at every 45 sec interval I am hearing "Hello", which i believe is from Alexa.

Regards,
Nitin

PS: I am first time user of Pi and linux environment

building failure

hello suiddharth recently i had run your code, but the following error has been occured , and i did not get any device token . so please help me.

Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Alexa Voice Service Sample Java Client 20160207.7
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) @ sample-java-client ---
Error: Could not find or load main class com.amazon.alexa.avs.App
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.433 s
[INFO] Finished at: 2018-01-14T19:18:02+00:00
[INFO] Final Memory: 8M/20M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project sample-java-client: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
pi@raspberrypi:~/alexa-avs-sample-app/samples/javaclient $

audio test failed

i am using singtronics super mini usb 2.0 audio device and i am gettig the following error every time:
Recording WAVE '/home/pi/mic-test.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
Warning: rate is not accurate (requested = 16000Hz, got = 44100Hz)
please, try the plug plugin

google-assistant-demo command giving error

@shivasiddharth , I am getting below error when i run google-assistant-demo command. I tried to register the model using "googlesamples-assistant-devicetool & register-model" but getting error like "Failed to register model: 400". My assistant.json is in home/pi location. Any help in this regard is appreciated.
usage: google-assistant-demo [-h] [--credentials OAUTH2_CREDENTIALS_FILE]
--device_model_id DEVICE_MODEL_ID
[--project_id PROJECT_ID]
google-assistant-demo: error: the following arguments are required: --device_model_id

USB Mic (Playstation Eye) not working

Sid,
A noob here. While testing audio during the installation, aux out speaker works fine but mic recording does not playback (no sound). I'm using a PS3 eye usb cam as microphone (worked well with simple google assist install). In this project shows .wav file directory does not exist. What to do? sorry if i sound silly...

Google assistant service not detecting wakeword

Dear sid ,
Thanks for this project, it was very nice learning experience.
There is one problem with me , google assistant service is running ok but wake word ok google is not detected .
Meanwhilr alexa is working fine

How to add or modify radio stations to actions.py

I have tried to modify 'Radio 5' to 'Radio 4' with the same link, but it does not work. Do I need to do additional actions to make it work? The same with adding new entry/links. Does not work. Need help. Thanks.

Failed Alexa token

When i try to authenticate the alexa and login with the program it said token get ready and on one of the terminals it shows an error and on the 1st terminal it shows error of couldn't get something.

Question on RaspberryPi zero W + ReSpeaker 2mic HAT

  1. Will the hotword activation work on a Pi zero W?

  2. Will an SD card build on a Pi 3 ver B with the latest Raspbian OS and intrusions from this git with Assitants Pi work if inserted on a Pi zero W ?
    If not what alterations are needed for this to work?
    Thanks

Issue with google-assistant-demo

Hi,
I followed all the steps and was successfully able to run Alexa.

I am having an issue with the google-assistant-demo. Here is the output I get,

env) pi@raspberrypi:~ $ google-assistant-demo
[4469:6245:ERROR:audio_input_processor.cc(755)] Input error
ON_MUTED_CHANGED:
{'is_muted': False}
ON_START_FINISHED
ON_ASSISTANT_ERROR:
{'is_fatal': True}
[4469:6634:ERROR:audio_input_processor.cc(755)] Input error
ON_ASSISTANT_ERROR:
{'is_fatal': True}

What could be causing this? Can you help please?

What audio drivers to use with Bluetooth speaker with inbuilt mic

I am trying to use JBL GO Bluetooth speaker for Audio I/O.

I have a temporary fix for the mic to work. https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#index8h3

I tried to test the audio directly. The audio plays well. But, I was unable to test the mic because I need to select audio drivers for same.

I need to know how to use my Bluetooth speaker & mic with this repository. I don't see any drivers for Bluetooth device in the audio-drivers folder. I can build a file & send a pull request if someone can guide me how to make it.

Import psutil

I am having difficulty overcoming the ImportError: No module named 'psutil' issue. This is similar to #37, but following the guidance I am still encountering the error.

I am using a Raspberry Pi 3 running Stretch. Alexa is working, Google Assistant demo works. However, when I run:

pi@raspberrypi:~ $ /home/pi/env/bin/python -u /home/pi/GassistPi/src/main.py --device_model_id HomeAssistantRPi
Traceback (most recent call last):
File "/home/pi/GassistPi/src/main.py", line 25, in
import psutil
ImportError: No module named 'psutil'

I get the specified import error. I installed the following modules under pi@raspberrypi:~ $ source env/bin/activate:
pip install psutil
pip install gmusicapi
pip install googletrans
pip install gtts
pip install pafy
pip install pychromecast

I again ran:

pi@raspberrypi:~ $ /home/pi/env/bin/python -u /home/pi/GassistPi/src/main.py --device_model_id HomeAssistantRPi
Traceback (most recent call last):
File "/home/pi/GassistPi/src/main.py", line 25, in
import psutil
ImportError: No module named 'psutil'

encountering the same error.

I noted the following when pip install psutil the second time:

(env) pi@raspberrypi:~ $ pip install psutil
Requirement already satisfied: psutil in ./env/lib/python3.4/site-packages

Given Stretch is 3.5, I copied psutil and psutil 5.4.3. dist-info file folders from /home/pi/env/lib/python3.4/site-packages
to
/home/pi/env/lib/python3.5/site-packages

I re-ran:
pi@raspberrypi:~ $ /home/pi/env/bin/python -u /home/pi/GassistPi/src/main.py --device_model_id HomeAssistantRPi
Traceback (most recent call last):
File "/home/pi/GassistPi/src/main.py", line 25, in
import psutil
File "/home/pi/env/lib/python3.5/site-packages/psutil/init.py", line 100, in
from . import _pslinux as _psplatform
File "/home/pi/env/lib/python3.5/site-packages/psutil/_pslinux.py", line 26, in
from . import _psutil_linux as cext
ImportError: cannot import name '_psutil_linux'

and encounter the specified error above.

I think I'm on the correct track, but looking for any direction on how to get the proper files in
/home/pi/env/lib/python3.5/site-packages
or any other insights on what is causing the error.

Thanks

Disable original hotwords

Is there a way to change the hotword and disable "hey alexa" & "ok google" ?
Because I'm getting too many false positives, I've tried to play with kitt.ai but it doesn't disable the original hotword.

Kodi control

Sir, I'm not installed this on my rpi 3b but before starting I want to confirm whether I can control kodi using Google assistant in this build. And if yes, what are the few examples that I can try?

Thanks in advance.

google assistant demo not working

i've opened a new terminal and typed this

                             source env/bin/activate

after that:

(env) pi@raspberrypi:~ $ googlesamples-assistant-hotword --project_id beebombot-193106 --device_model_id beebombot-193106-20180127112614
bash: googlesamples-assistant-hotword: command not found

whats the problem...

headphone mic not working...

HI Sid ..... I am trying to use my headphone mic with the program but it is not working.....even at the time of installation the mic didn't work....please help me out.....

Python psutil module missing

Reimaged my RPi3 and did a fresh install of both assistants. Installation tests worked. Alexa is working. Google assistant won't start. Log shows this:

Feb 4 15:32:44 voice systemd[1]: Started Google Assistant-Voice.
Feb 4 15:32:45 voice python[1855]: Traceback (most recent call last):
Feb 4 15:32:45 voice python[1855]: File "/home/pi/GassistPi/src/main.py", line 25, in
Feb 4 15:32:45 voice python[1855]: import psutil
Feb 4 15:32:45 voice python[1855]: ImportError: No module named 'psutil'
Feb 4 15:32:45 voice systemd[1]: gassistpi-ok-google.service: Main process exited, code=exited, status=1/FAILURE

Cannot test google assistant in env

Ran through the installer for both Google and Alexa. Alexa wake work tested fine. However, I cannot get to test the Google portion. Any help?

pi@raspberrypi:~ $ source env/bin/activate
(env) pi@raspberrypi:~ $ googlesamples-assistant-hotword --project_id 'pi-8a638' --device_model_id 'pi-8a638-googlepi-35rp2i'
-bash: googlesamples-assistant-hotword: command not found

alexa sample voice service java......is not working on my linux device

it says
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart [email protected]
6 info start [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec start script
9 error [email protected] start: node ./bin/www
9 error Exit status 1
10 error Failed at the [email protected] start script.
10 error This is most likely a problem with the alexa-voice-service-sample-companion-service package,
10 error not with npm itself.
10 error Tell the author that this fails on your system:
10 error node ./bin/www
10 error You can get their info via:
10 error npm owner ls alexa-voice-service-sample-companion-service
10 error There is likely additional logging output above.
11 error System Linux 4.9.59-v7+
12 error command "/usr/bin/nodejs" "/usr/bin/npm" "start"
13 error cwd /home/pi/alexa-avs-sample-app/samples/companionService
14 error node -v v4.8.2
15 error npm -v 1.4.21
16 error code ELIFECYCLE
17 verbose exit [ 1, true ]

Error while run google assistant demo

Hi shivasiddharth..

The following error has been occurred while run google assistant demo in new terminal ( i install only google assistant)

Traceback (most recent call last):
File "/home/pi/env/bin/googlesamples-assistant-hotword", line 7, in
from googlesamples.assistant.library.hotword import main
File "/home/pi/env/lib/python3.5/site-packages/googlesamples/assistant/library/hotword.py",
line 27, in
from google.assistant.library import Assistant
ImportError: No module named 'google.assistant.library'

Alexa does not provide local information

For some reason Alexa does not provide local information like the local wheather even if I input in the correct local address at the Alexa app and the address is validated by AVS.
When I ask for the wheather Alexa responds with “which location? If you define your location in the Alexa app I can provide the wheather for your city”.
Curiously the time variable set to GMT UK is working fine and I get the local time.

Any ideas on how to fix this please ?

voice recording test doesn't record the sound....

it says 'arecord: main:788: audio open error: Device or resource busy

Finished recording the samples.

Playing back the recorded audio sample......

/home/pi/mic-test.wav: No such file or directory
Did you hear the recorded audio sample?
[y/n] >> n
Execute arecord -l in terminal and verify the card id with the ones mentioned in asound.conf file and .asoundrc file. Exiting...

env/bin/activate: No such file or directory

Hey,
tried to install your script with on a fresh raspbian lite image, but i encounter this error at the end when I try to run Google Assistant:


================Run the Alexa demo to authenticate============
To run the demo, do the following in 3 seperate terminals:
Run the companion service: cd /home/pi/alexa-avs-sample-app/samples/companionService && sudo npm start
Run the AVS Java Client: cd /home/pi/alexa-avs-sample-app/samples/javaclient && sudo mvn exec:exec
Run the wake word agent:
  KITT_AI: cd /home/pi/alexa-avs-sample-app/samples/wakeWordAgent/src && sudo ./wakeWordAgent -e kitt_ai


===============Run Google Assistant demo===========
To run the google assistant demo
Open a new terminal and execute:
source env/bin/activate
google-assistant-demo

After verifying the working of both, restart the Pi to start the services
pi@raspberrypi:~ $ source env/bin/activate
-bash: env/bin/activate: No such file or directory

Any tip?
btw thanks for this setup, can't wait to test it out!

Google Assistant Not Starting at Boot

I am able to run google assistant demo in source env/bin/activate, googlesamples-assistant-hotword --project_id 'mypi3-env-190008' --device_model_id '2011205041740' . I am not able to get Google Assistant to run on boot. I am using a Raspberry PI3 B and fresh install of Raspbian. After I do sudo systemctl enable gassistpi-ok-google.service and sudo systemctl start gassistpi-ok-google.service. I then do sudo systemctl status gassistpi-ok-google.service and get/see the following:

● gassistpi-ok-google.service - Google Assistant-Voice
Loaded: loaded (/lib/systemd/system/gassistpi-ok-google.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-02-05 12:10:46 PST; 1s ago
Process: 11404 ExecStart=/home/pi/env/bin/python -u /home/pi/GassistPi/src/main.py --project_id mypi3-env-190008 --device_model_id mypi3-env-190008-2011205041740 (code=exited, status=1/FAIL
Main PID: 11404 (code=exited, status=1/FAILURE)

Feb 05 12:10:46 raspberrypi systemd[1]: gassistpi-ok-google.service: Failed with result 'exit-code'.
Feb 05 12:10:46 raspberrypi systemd[1]: gassistpi-ok-google.service: Service hold-off time over, scheduling restart.
Feb 05 12:10:46 raspberrypi systemd[1]: Stopped Google Assistant-Voice.
Feb 05 12:10:46 raspberrypi systemd[1]: gassistpi-ok-google.service: Start request repeated too quickly.
Feb 05 12:10:46 raspberrypi systemd[1]: Failed to start Google Assistant-Voice.
Feb 05 12:10:46 raspberrypi systemd[1]: gassistpi-ok-google.service: Unit entered failed state.
Feb 05 12:10:46 raspberrypi systemd[1]: gassistpi-ok-google.service: Failed with result 'exit-code'.

Any help or suggestions would be appreciated.
Thank you in advance
Rick

Volume control for Google Voice HAT

I have both Alexa and the Google Assistant running on the Google Voice kit. The volume of the Alexa response is twice as loud as that of the Google Assistant. I tried lowering the volume in the Raspbian desktop, but that also lowered the Google Assistant volume to a barely audible level. Is there a way to adjust the volume of either assistant that is independent of the other?

alexa token retrival failure

when i typed the command in new terminal Run the companion service: cd /home/pi/alexa-avs-sample-app/samples/companionService && sudo npm start

Listening on port 3000
Successfully retrieved registration code for AnirudhBot / 123456789
Error retrieving access token: InvalidSessionId, No refresh tokens stored for this session id: f69192a7-8eb1-4611-9134-a2782c29909a
Successfully retrieved registration code for AnirudhBot / 123456789
Error retrieving access token: InvalidSessionId, No refresh tokens stored for this session id: a6a841d3-ac49-43d1-beae-ba5a53e4f1c8
_http_outgoing.js:356
throw new Error('Can't set headers after they are sent.');
^

Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:356:11)
at ServerResponse.header (/home/pi/alexa-avs-sample-app/samples/companionService/node_modules/express/lib/response.js:700:10)
at ServerResponse.send (/home/pi/alexa-avs-sample-app/samples/companionService/node_modules/express/lib/response.js:154:12)
at ServerResponse.json (/home/pi/alexa-avs-sample-app/samples/companionService/node_modules/express/lib/response.js:240:15)
at ServerResponse.send (/home/pi/alexa-avs-sample-app/samples/companionService/node_modules/express/lib/response.js:142:21)
at /home/pi/alexa-avs-sample-app/samples/companionService/app.js:97:17
at IncomingMessage. (/home/pi/alexa-avs-sample-app/samples/companionService/authentication.js:322:17)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:923:12)

npm ERR! [email protected] start: node ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the alexa-voice-service-sample-companion-service package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get their info via:
npm ERR! npm owner ls alexa-voice-service-sample-companion-service
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.9.59-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! cwd /home/pi/alexa-avs-sample-app/samples/companionService
npm ERR! node -v v4.8.2
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/alexa-avs-sample-app/samples/companionService/npm-debug.log
npm ERR! not ok code 0
pi@raspberrypi:~/alexa-avs-sample-app/samples/companionService $

Alexa cannot find any smart home devices even after reconnecting the accounts

Alexa is not able to discover my smart home devices even if (as advised on Sid’s YouTube channel) I disassociate / delete and reassociate / re enable my smart home devices and their cloud services.
I have Samsung smartthings hub and WeMo lights I deleted them all from my Alexa app and deregistered the smartthings and wemo acounds from it then reregistered them through the Alexa app pressed discover through the app but the assistant Pi Alexa does not see them. My other Alexa echo devices on the same Alexa account do see my smart home services and devices though.

Any thoughts ?
Much obliged and once again great project just trying to help make it even better with my testing.

Alexa works headless/wakeword on Pi zeroW with Respeaker 2mic -Not an issue

Note: i do not know how to submit this as a contribution to this project so i wrote it here i hope that @sid will use this in a coments section for others to benefit from and thank uou Sid!
I have successfully instaled using AssistantsPi Alexa on a Pi zero W using the Pi3 instal process and it works with wakeword activation - no need for the button.
I have not only completed the install on a Pi3 but allso on a PiOw and it works like a charm. I have only installed Alexa from the options of assistant pi as with Google assistant and Alexa running simultaneously it won't work on Pi0 but it does on Pi3 btw.
The way i done it was to install the AssitantsPi by choosing option 2 Alexa only and choose 1 for AIY hat as soundcard option. That leaves the asound.conf empty. I have an AIY hat so i could test the sound but u don't need to have one i believe you can just go ahead and finish the install any way without confirming the sound check. Then when i finished installing on the pi3 (btw i skipped the very last command of the instructions on the Assistant Pi git that activated Google assistant) i removed the AIY hat and placed the Respeaker 2 mic on the Pi3. I Then downloaded the Rspeaker 2mic drivers from their git https://github.com/respeaker/seeed-voicecard and the rebooted.
Miraculously the respeaker drivers had deleted the only other appearing audio card that was the AIY hat's and the asound.conf file was populated. BTW Copy pasting the contents of the asound to asoundrc made no difference.
Alexa is working perfectly the only thing there is no "hello" sound when she starts up it must be because i skipped the last command that was supposed to activate the Google assistant i assume it contained some .wav for Alexa or maybe simply the instal script runs in a way that if u install only alexa you get no "hello" at startup. Any way i then took the very SD card with that Pi3 build and another miracle happened when i put it and the respeaker on a Pi zero W it works there too and i have sound from all channels! Only thing on the Pi0 it takes a good 3 to 5 minutes to boot up as the Pi0 is slow.
Any way very please with Alexa from AssistantsPi works headless and with the hotword activation -no button needed, and the package of the device is so small it can fit into anything. My next step it to use Snowboy for custom wake words and activate some of the GPiO pins to be able to control a relay from the PiO. Thank you Sid!

Manual Start of Google Assistant gives "No module named 'google.assistant.library'

Hi Shiva,

I have followed the correct instructions for the post December 20th installation from this link https://github.com/shivasiddharth/Assistants-Pi#readme but when I try to start the Google Assistant manually using the /home/pi/env/bin/python -u /home/pi/GassistPi/src/main.py --project_id 'replace this with your project id' --device_model_id 'replace this with the model id' command I get an error as below:-

Traceback (most recent call last):
File "/home/pi/GassistPi/src/main.py", line 29, in
from google.assistant.library import Assistant
ImportError: No module named 'google.assistant.library'

Can you help please?

Respeaker hat issue - got sound but no mic input & alexa repeats "hi"

@shivasiddharth your suport kindly please i am almost there.
I have cloned my working SD with assistants pi runing with the AIY hat and used it to make it work with the Respeaker 2mic hat. I have instaled its drivers as instructed on their GIT and got sound working ! I can hear GA initiating l, tone and "hello" and then AVS too saying "hi".
But when i speak the assistants do not listen to me, cant hear me. And when i am not sure how to do a test record ether.
I cheked the sound levels and sound config files and they look ok.
Any advice ? It looks like i am almost there.
I tried suggestions mentioned on Giassipi on the respeaker but still no mic input.

Folder locations and folder usage with new AssistantsPi setup

continued from GassistPi issue..............Unfortunately Google AIY was limited usage so i decided to try the https://github.com/shivasiddharth/Assistants-Pi setup. It works great with both alexa and aiy but is it installing the same directories? I ask because GassistPi did not seem to need to be deleted and works along side the Assistants setup but AIY was constantly triggered by my tv and wasting api quota for aiy, so i first renamed entire GassistPi file to Gassist.backup which made both Alexa and AIY stop working on next boot(no recognition on "Alexa" or "OK Google" (no custom wake word set). I renamed the file to original name and things worked on next boot.....I then instead renamed the GassistPi/src file to GassistPi/backup.src and Amazon Alexa works but only with my newly created custom wake word "Oasis". Again, my question is about the GAssistPi folder (i ask because these are both your developments and i see AssistantsPi did use the same "/home/pi/alexa-avs-sample-app" directory as alexa-avs-sample folder git would have. Is GassistPi part of the AssistantsPi setup or an unrelated folder?

Custom Wakeword

Sir, first of all i want to thank you for your fantastic works. I have tried to install Alexa and Google Assistant together using the instructions, but i don't know what went wrong but nothing worked. I've tried six times on fresh installed Raspbian and i was disappointed.
But later i tried to install alexa avs sample app seperately and it worked without any problems. Then without uninstalling anything, i tried to install google assistant, and it also worked!! Now I'm able to run both without any issues.

But my only concern is i can change alexa's wakeword, but not google assistant's. So i want to know whether an update to this will come in near future so that i can change wakewords of both to my custom words.

Thanks in advance.

How to Uninstall?

Or at least remove the services from automatically running at boot.

not starting on boot ?

Hi When my system boots it says "hello" (I have only installed alexa) and then it does nothing I am using the google aiy hat. This is the output

pi@raspberrypi:~ $ sudo systemctl status gassistpi-ok-google.service
● gassistpi-ok-google.service - Google Assistant-Voice
Loaded: loaded (/lib/systemd/system/gassistpi-ok-google.service; enabled)
Active: failed (Result: start-limit) since Sun 2018-01-14 22:42:59 UTC; 1min 7s ago
Process: 642 ExecStart=/home/pi/env/bin/python -u /home/pi/GassistPi/src/main.py --project_id project-i d --device_model_id saved-model-id (code=exited, status=203/EXEC)
Main PID: 642 (code=exited, status=203/EXEC)

Jan 14 22:42:58 raspberrypi systemd[1]: gassistpi-ok-google.service: main process exited, code=exi...EXEC
Jan 14 22:42:58 raspberrypi systemd[1]: Unit gassistpi-ok-google.service entered failed state.
Jan 14 22:42:59 raspberrypi systemd[1]: gassistpi-ok-google.service holdoff time over, scheduling ...art.
Jan 14 22:42:59 raspberrypi systemd[1]: Stopping Google Assistant-Voice...
Jan 14 22:42:59 raspberrypi systemd[1]: Starting Google Assistant-Voice...
Jan 14 22:42:59 raspberrypi systemd[1]: gassistpi-ok-google.service start request repeated too qui...art.
Jan 14 22:42:59 raspberrypi systemd[1]: Failed to start Google Assistant-Voice.
Jan 14 22:42:59 raspberrypi systemd[1]: Unit gassistpi-ok-google.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

Alexa & Google Assistant should not respond to hot word when talking!

Hot word detection keeps on listening for "Alexa" or "Hey Google" when Alexa or GA are talking.
Especially Alexa quite often speaks her own name in her reaction to a questions and consequently triggers the next conversation before the current one is finished. This can bring her in an infinite loop, repeating the reaction till she arrives at her own name again, etc.
During conversation the hot word detection should be disabled to avoid this.

When I try to run the Google demo I get ALSA lib pcm.c:8403:(snd_pcm_set_params) Rate doesn't match (requested 16000Hz, get 48000Hz)

Hi,
Sorry to bother you but I am having problems. I did the installation from a fresh Raspbian Stretch install.

When I try to run the Google demo I get the following error:
pi@raspberrypi:~ $ source env/bin/activate
(env) pi@raspberrypi:~ $ google-assistant-demo
ALSA lib pcm.c:8403:(snd_pcm_set_params) Rate doesn't match (requested 16000Hz, get 48000Hz)
[16409:16424:ERROR:audio_input_processor.cc(755)] Input error
ON_MUTED_CHANGED:
{'is_muted': False}
ON_START_FINISHED
ON_ASSISTANT_ERROR:
{'is_fatal': True}
[16409:16425:ERROR:audio_input_processor.cc(755)] Input error
ON_ASSISTANT_ERROR:
{'is_fatal': True}

I looked at some of the similar issues and you asked for /etc/asound.conf, this file does not exist. Here is my .asoundrc file:
pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.