How to Setup an Orange Pi Zero DIY Smart Speaker with Google Assistant SDK

A preview release of Google Assistant SDK working with Raspberry Pi 3 and other ARMv7 boards was released in May, and soon after, AIY Projects Voice Kit was offered for free with Raspberry Pi Magazine in order to a complete smart speaker kit working with RPi 3. I wanted to try it on one of FriendlyELEC or Shenzhen Xunlong Allwinner board, since all we need is audio input and output, and an Internet connection. Earlier this month, I came across Orange Pi Zero Set 6 Kit that had all I needed: Orange Pi Zero ARM Linux board, an expansion board with built-in microphone and audio output jack, and a cute and small case to neatly put everything together.

Orange Pi Zero Set 6 Kit Unboxing and Assembly

Shenzhen Xunlong sent me the kit so that I can try it out.

The package includes two Orange Pi packages, the plastic case, some a bag with screws and rubber pads.

One of the package comes with Orange Pi Zero board powered by Allwinner H2+ quad core processor with 512 MB RAM, micro USB for power, 10/100M Ethernet, a USB port, a WiFi antenna, and expansion headers on the top…

Click to Enlarge

.. and a micro SD card slot on the bottom, which we’ll use to boot the operating system.

The second package is for Orange Pi Zero Interface board v1.1 with two more USB port, an IR receiver, a 3.5mm audio jack, and a built-in microphone (top right).

Click to Enlarge

The next step is just to plug the interface board into Orange Pi Zero board, bending the WiFi antenna between the two boards…

Click to Enlarge

… before pushing the board from the bottom of the enclosure, tightened the cover with the 4 screws, and adding the 4 rubber pads.

Click to Enlarge

Installing Ubuntu on Orange Pi Zero & Configuring Networking and Audio Input & Output

Google Assistant SDK requires Ubuntu or Debian operating system, so I downloaded Ubuntu server legacy image on Armbian website, since the mainline image does not support XR819 WiFi module at all. I then extracted Armbian_5.30_Orangepizero_Ubuntu_xenial_default_3.4.113.7z and flashed Armbian_5.30_Orangepizero_Ubuntu_xenial_default_3.4.113.img  with Etcher on a micro SD card using my main computer.

Once it was done, I took the micro SD card to Orange Pi Zero board, connected my own speakers to the 3.5mm audio jack and USB for power, as well as a 5V/2A USB charger to power the system.

Click to Enlarge

You may notice an extra USB dongle on the picture above, but we’ll talk about that later.

I’ll use WiFi to test Google Assistant, but I also connected an Ethernet cable to make it easier for first time setup. If you don’t have Ethernet, you could also connect the board via a USB to TTL board to access the serial console.

After looking up the IP address of the board in my router, I connected with SSH using root (password: 1234):


The very first boot it will ask your to change the root password, and create a new user. You may want to create “pi” user at this stage. We should not be able to access the command, and run the following command to configure Orange Pi Zero board:


I first changed the timezone.

Then selected WiFi – Connect to wireless access point to connect to my WiFi router.

We can quit armbian-config, and optionally disconnect the Ethernet cable, and reconnect SSH over WiFi, which I did.

Back in the command line, I tested audio recording & playback with the built-in microphone and speakers using the same commands as in ReSpeaker guide:


The first command recorded my voice, and then I pressed Ctrl+C to stop, and play it back with the second command. I worked fine for me. If you wish you can adjust the playback and recording volume with:

We’ll also need to create .asoundrc file for Google Assistant to work with ALSA. For we need to note the microphone card and device number (0,0):


as well as speaker card and device number (0,0):


If you want to use your TV as speaker, you’d use Card 1, device: 0.

If you have not created a pi or other user yet, you’ll want to add one belonging to sudoers and audio groups, and go the home directory:


Now create a ~/.asoundrc with the following match the card and device for our mic and speaker:


[Update: As we’ll see below this won’t work with the built-in microphone, but as indicated in the comments below, this can be fixed by changing pcm.mic section with:


I have not changed the rest of the post, but the built-in microphone on Orange Pi Zero does work now]

Setting Up Google Assistant on Orange Pi Zero

Now that audio and networking are both setup and working, we can carry on with the instructions to install Google Assistant SDK and demo. Those are the same for all boards, and I’ll describe them below in details.

We need to configure a Google Developer Project.

Go to the Project page in Google Platform Console, and click on Create Project.

I called it Orange Pi Zero Smart Speaker, and clicked on Create.

Next, we’ll need to enable Google Assistant API for our project. Simply click on Enable on that page. The “Orange Pi Zero Smart Speaker” project was already selected in my case.

We’re then being asked to create an OAuth Client ID. I only filled my email address, and a product name before clicking on Save.

Select Other in the next page, and give another name – I used “Linux Thingy” – before clicking on Create.

You should now see an OAuth client pop-up window with your client ID and secret. You can just click OK, no need to copy or save either.

Instead we’ll download client_secret_[your_client_id].json file on the next page by clicking on the arrow circled in red.

I then copied that file to Orange Pi Zero board using scp (change [your_client_id] with your actual client ID):


Now that we have configured most options we need in Google Cloud platform, let’s install Python 3 and dependencies:


At this stage to need to make sure “Web & App Activity” with “Include Chrome browsing history and activity from websites and apps that use Google services”  checked, Device Information and Voice & Audio Activity are enabled in the Activity Controls page. All options were already enabled for me by default.

We can now install Google Assistant SDK package including library and sample code:


and the authorization tool:


Run the authorization tool:


This should show a text reading “Please visit this URL to authorize this application: https://….”. Select the URL and open it in a web browser, and copy/paste the authorization code you see in the web browser back into the terminal.

We can now start the demo


That’s the initial output


I went to say “OK Google” and “Hey Google”, and… nothing. No answer, and no info in the terminal window either. I tried several times, and also played with:


as explained in the troubleshooting section in Google Assistant documentation, incrementing the value by 6 until I reached -60, before running the demo, and no luck. So I thought maybe my “American accent” could have been the problem, so I launched Google Translate in my phone, and make it say “OK Google”. Same disappointing result. I went to Google Cloud Console, and good see some activity, but with 100% errors.

Click to Enlarge

So I did some searching on the web, I could find one person changing the .asoundrc file, but I did not work for me with the file generating plenty of sound related errors when running the demo, and another fix a similar problem by changing the microphone. Which reminded me, I had bought a cheap USB microphone on eBay for $1.45. So I connected it to Orange Pi Zero board, and that’s the extra USB dongle in the photo with the speakers higher in this guide, and check the card and device number:


We can see the USB card 2, device 0, so I update the relevant line in pcm.mic section in .asoundrc:


and ran the demo again. Success! The device would reply to make “OK Google” request, and tell me the time, my name, the weather for tomorrow, sing a song, do some calculus and so on.

This is what the output looks like when the demo works:


Bear in mind that Google Assistant SDK is in preview mode right now, and it’s mainly aimed at developers. First, I understand you can’t do automation tasks, or play music like you can on an actual Google Home. The good news is that you can roll you own implementation, and for example, somebody made his AIY Project Voice Kit work with Google Music, something you should be able to reproduce on other boards. Google Home also includes a microphone array, which will make hot word detection more reliable even in noisy environment. Orange Pi Zero + USB microphone did a decent job though, as I could use it 5 or more meters away.

Next time you boot the board, you can login as pi user, and run the following commands to run the demo:


You could also use systemd to automatically start the demo, or your own implementation, and I did so with instructions adapted from Nordic Semi’s Google Assistant Wiki.

First, create /etc/systemd/system/google-assistant-demo.service file with the following content:


I add “Type = idle” as other the app would not run, possibly because it would start after the audio was enable. I did not find any audio specific services handled by systemd, so “type = ilde” will make sure the service starts after other are loaded.

Now we can enable the service, and start it:


The demo will run at this point, and it will start automatically each time your boot the board. I played with it for several hours and it seemed stable. Some people have however expressed concered about WiFi on Orange Pi Zero, so if you encountered some instability issues, you may want to switch to Ethernet instead, or use a WiFi USB dongle, or use another Orange Pi or NanoPi board with a time-proven WiFi module.

I’d like to thank Shenzhen Xunlong Software for sending the kit my way. If you are interested, you can purchase it for $12.95 + shipping.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
124 Comments
oldest
newest
Jon Smirl
7 years ago

Array mics are the defining piece of the smart speaker category since they allow it to work from more than a couple of feet away. Does the Google SDK support multiple mic inputs? Array mics work by detecting the hot word in the input stream. Once the hot word is located the phase difference between the multiple copies of the hot word is measured (one copy per mic). Then do some math magic and all input that does not have that same phase delay is removed from the input stream. So you could have a TV sitting off at a… Read more »

Fossxplorer
Fossxplorer
7 years ago

Does this work on a Orange Pi Lite?
Can i take risk of ordering 32GB Samsung Evo card or do i need to have it smaller?

tkaiser
tkaiser
7 years ago

Fossxplorer :
Does this work on a Orange Pi Lite?

Following the above instructions this will work on every SBC supported by Armbian.

Squalazzo
Squalazzo
7 years ago

I’ve the 256mb model doing nothing on the bench, would it be enough? Thanks

Kaiyoti
Kaiyoti
7 years ago

I followed the instructions on your previous blog. And modified to give it a response sound. It works great.

The Wifi on the opi zero is my biggest problem. It’s often unreliable, google simply tells me ‘there was a glitch, please try again’. And i didn’t get the expansion board so I’m reserving the usb port for a Samson Go Mic. My only option is ethernet which IMO is not very usable. I may have to look into that expansion board for usb ethernet.

aquilegia
aquilegia
7 years ago

Try to insert “format S16_LE” within mic.slave section in ~/.asoundrc file. This solved “OK Google” recognition problem in my case.

Paul
7 years ago

Whew, seems like a lot of work though it would be cool if this was available to people who didn’t know coding and Linux well. I’ll just buy the Google home.

tkaiser
tkaiser
7 years ago

@Jean-Luc Aufranc (CNXSoft) Wrt Wi-Fi on OPi Zero according to Xunlong PCB rev 1.4 (that’s the one you have) should ‘fix’ Wi-Fi issues. At least they changed something power related (a web search for ‘New OPi Zero – Yet another high temperature issue…’ should be sufficient, in post 3 there are some close-ups of PCB differences). PCB rev 1.4 also has for whatever reasons higher internal temperature readouts — more details also at the end of the aforementioned thread. The other issue you ran into — no SSH access through Wi-Fi after some time — seems to be related to… Read more »

dgp
dgp
7 years ago

@tkaiser

A lot of the issues with the xr819 seem to be broken frames so if they fixed the antenna or power supplies for it that might actually improve it. The driver for the chip is still a bag of poo though. 😉

aquilegia
aquilegia
7 years ago

Also you can install and test alexa through https://github.com/alexa-pi/AlexaPi. This software can trigger following voice command by “alexa” voice (using by pocketsphinx) or GPIO button. Then, it needs delayed voice input, nevertheless having not good recognized result, i guess, partly by worse performance compared to RPi 3.

tkaiser
tkaiser
7 years ago

dgp : xr819 … The driver for the chip is still a bag of poo though. Of course. But what puzzles me is: people talk since months about OPI Zero PCB rev 1.4 overheating (which is mostly wrong temperature readout and not really overheating… which is a real problem due to throttling jumping in too early based on the temperatures being reported way too high). Xunlong’s explanation that this is due to ‘fixed Wi-Fi’ is also known since at least a month. And literally no one having an OPi Zero 1.4 in his hands is going to test this. It’s… Read more »

tkaiser
tkaiser
7 years ago

aquilegia : partly by worse performance compared to RPi 3. Hmm… I just looked into my archives. With code that makes use of NEON I see RPi 3 being approx. three times faster than an H3/H2+ device running at the same clockspeed with same amount of CPU cores active. When talking about usual integer performance RPi 3 has an advantage of maybe 130%-140% compared to H3/H2+ devices running also at 1.2GHz. Applications that depend on memory bandwidth/latency are more affected since RPi 3 memory is a lot faster compared to H2+/H3 devices with single bank DRAM configuration (especially when using… Read more »

Athar
Athar
7 years ago

@tkaiser

Back 3/2016 you debunked claims about RPi3 being faster than OPi PC/+ by 4-6x and said RPi3 can’t even do H265 HW acceleration:

https://forum.armbian.com/index.php?/topic/789-breaking-news-choosing-armbian-speeds-up-your-orange-pi-multiple-times/

Now NEON code has upset the situation?

Can’t NEON also be run on H3, as it is on CHIP with 1080p?

tkaiser
tkaiser
7 years ago

@Athar NEON is neither related to HW accelerated video decoding nor to shitty Allwinner default thermal/throttling settings (that’s all what the above article in Armbian forum was about). Why not looking up first what NEON is (a web search for ‘Advanced SIMD (NEON)’ should be sufficient)? NEON code on ARMv8 platforms (like RPi 3) can run much faster than on older ARM architectures (like ARMv7 on an OPi Zero). Since @aquilegia talked about ‘worse performance’ maybe he already looked into code and has an idea whether these ‘spy on people in their home’ APIs from Google or Alexa make use… Read more »

Athar
Athar
7 years ago

@tkaiser

Ok thanks. I was always confused about V7 vs V8 code advantage.

So V8 is far superior, and CHIP A13/R8 is V8?

Drone
Drone
7 years ago

@Jon Smirl @Jon Smirl, You said, “Dedicated array mic chips are about $7”. Can you post a link please? I’ve seen cheap single I2S MEMS mics on a chip before, but never a mic array on a chip, much less one for $7. Here is a small mic array board with an XMOS commutating multi-core micro-controller capable of doing parallel DSP. But it’s not an array on a chip, and it certainly costs more than $7 (I think it goes for around $80-$100). https://www.xmos.com/support/boards?product=20258 Another device using the same approach is the $79 ReSpeaker by Seeed Studio. https://www.seeedstudio.com/ReSpeaker-Mic-Array-Far-field-w%2F-7-PDM-Microphones-p-2719.html Note, I’ve… Read more »

tkaiser
tkaiser
7 years ago


Thank you for the numbers. Given that for whatever reason every second wireless frame gets dropped/retransmitted the performance would be on par with the other usual suspects when we’re talking about 1T1R/2.4GHz Wi-Fi once the driver could be fixed (which would require Allwinner providing real documentation which most likely will never happen).

Jens
Jens
7 years ago

Hi.
when i try to run the demo, i get the following error:
[2375:2391:ERROR:audio_input_processor.cc(755)] Input error

any advice?

thx

Andrzej Raczkowski
7 years ago

@Jon Smirl
cheap array mic chip – I’m interested too, Jon can you add more info please?

OrangePro
OrangePro
7 years ago

Hello.
I’m trying to scp my client ID into my Orange Pi Zero, but it returns with ‘No such file or directory’,
even though I’ve downloaded the client_secret_[your_client_id].json file onto my computer.
Any suggestions? Thanks.

OrangePro
OrangePro
7 years ago

^ I mean when I’m trying to run the authorization tool..

Jorg Muskens
Jorg Muskens
7 years ago

To get the beep back you can change the __main__.py file in /env/lib/python3.5/site-packages/google/assistant/

i added the following lines

Actually it can be anything you want. I have the original beep from my phone.

ArduinoPi
ArduinoPi
6 years ago

not working

Orange
Orange
7 years ago


So… this is what I’m typing into PuTTY;

scp client_secret_921851349903-ib5ek21thvcn2fel3fm5rm54j1h7r4ar.apps.googleusercontent.com.json [email protected]:~

^ client_secret_921851349903-ib5ek21thvcn2fel3fm5rm54j1h7r4ar.apps.googleusercontent.com.json < this is what the downloaded .json file is called, which is in my Downloads folder.

And this is what it results in;

[email protected]'s password:
client_secret_921851349903-ib5ek21thvcn2fel3fm5rm54j1h7r4ar.apps.googleusercontent.com.json: No such file or directory
root@orangepizero:~#

Thanks for any step by step help to this problem.

Orange
Orange
7 years ago

@Jean-Luc Aufranc (CNXSoft) I finally got the Google Assistant working thanks to your WinSCP suggestion. I really want to be able to use Google Assistant, as soon as the power adapter is plugged into the Orange Pi Zero, while connected to the internet via an ethernet cable. I followed the last set of instructions, and was able to use Google Assistant without typing source env/bin/activate and google-assistant-demo, while on the client program. I then tested to see whether I could forgo the client program, but got no reply. So I went back on the client program to see whether it… Read more »

abel
abel
7 years ago

I want to include led like voicekit but I get this error
I use “http://www.instructables.com/id/Orange-Pi-One-Python-GPIO-basic/”
“root@orangepizero:/home/pi# source env/bin/activate
(env) root@orangepizero:/home/pi# google-assistant-demo
Traceback (most recent call last):
File “/home/pi/env/bin/google-assistant-demo”, line 7, in
from google.assistant.__main__ import main
File “/home/pi/env/lib/python3.5/site-packages/google/assistant/__main__.py”, line 22, in
from pyA20.gpio import gpio
ImportError: No module named ‘pyA20’

saon
saon
7 years ago

First, thanks for the detailed instruction! Based on that I was able to install and run google assistant. However I run into a problem: As soon as I plug in my speaker into the AV out there is a constant and loud static noise in one of the two speakers. Changing speakers do not help, and I got the same noise even if I just plug in the headphone. The other speaker has no noise at all and gives the proper sound (in fact the noisy speaker produces no usable audio output). I tried several power cables and power supply… Read more »

saon
saon
7 years ago

Thanks. Newbie question: What’s the difference between the plug you used vs the ones in a (standard?) 3.5mm headphone jack?

SaOn
SaOn
7 years ago

Thanks for your suggestion. Turns out the circle board was not sitting properly inside the case — not by much, but just enough that the AV jack could not be inserted all the way. Following your suggestion, I resembled the whole thing and it now works. THANKS!

Another unrelated question: I’d like to put the OP speaker in my office where I have access to wifi but not the router. How would I enter the wifi connection’s name and password?

Jatinder Arora
Jatinder Arora
7 years ago

Excellent work. Fortunately, I didn’t face the mic issue and is working fine for me from a maximum distance of 5 feet. Beyond that it does not work. Thanks for sharing the detailed instructions. Next for me is: 1. Connect orange pi to a bluetooth speaker 2. Connect to WIFI using /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf. This is something, I am still not able to achieve. I get error when I try to do this. Finally, I used armbian-config as mentioned in your tutorials. ERROR: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1 Following is what I am doing =================OrangePi Zero and Armbian… Read more »

Flo
Flo
7 years ago

Hello, thank you very much for the tutorial, I worked at the first shot!
I am now wondering, is there any way to change the lang (to another one supported by Google Home/Google Assistant app)? I have searched a bit, without success 🙁

Flo
Flo
7 years ago

It tells me the same thing when I ask…
I noticed that, but this seems to be only for custom actions, switching languages might be implemented in next releases (I hope so)… I also searched for a way to change regional settings (units, date formats) without more success.
Thanks for your reply!

Fleder
Fleder
7 years ago

Hi there and thank you for this tutorial.

Unfortunately, I am stuck.
At “source env/bin/activate” it tells me “Permission denied” with sudo prefix it tells me “command not found”.
If i run this command as root, instead of the pi user, it works, but then again, in the next step “python -m pip install –upgrade google-assistant-library” it gives me this error: “no module named pip”.

Do you have any advice for me, how to make this work? Thank you kindly.

Fleder
Fleder
7 years ago


Thank you for your reply. But I do not know how to check the content of it? nano? Or how to change the permissions. Is it the CHMOD Command?
Thank you for your time.

Max
Max
7 years ago

Did anybody try to use google assistant on Orange PI android?

Hanzala
Hanzala
7 years ago

if i paste the code in the terminal will it automatically create a .asoundrc file? and do i need to install winscp to copy the file in orange pi zero or just pasting the code above will work?

Hanzala
Hanzala
7 years ago


if i use a analog mic where should i put it in?

Hanzala
Hanzala
7 years ago


i am not able to get the expansion board. but i have a female mic socket. so where should i connect its pins on the pi?

gungsukma
gungsukma
7 years ago

Can I do something like “Ok Google, turn on/off the LED”?
What file to edit?

Hanzala
Hanzala
7 years ago


can i use a sound card for speaker and microphone?

Hanzala
Hanzala
7 years ago

will the respeaker code work with an external usb mic?

Bungalow Bill
Bungalow Bill
7 years ago

I’ve followed this twice now on two Orange Pi Zero’s and I am really pleased to say it works perfectly – I am using the built in mic and added a non-powered speaker. All good. There have been, I think, slight changes in the way Google shows the web pages when you are configuring the API, but not too tricky to work out! However, one of my two Orange Pi Zero’s runs very hot when running this – so hot in fact that the case is barely touchable. It doesn’t seem to affect responsiveness of the “Ok Google” prompt but… Read more »

tkaiser
tkaiser
7 years ago

@Bungalow Bill
Most probably on the hot OPi Zero you can read ‘Rev 1.4’ while the colder one is an older PCB revision? Even if that’s not a software/settings issue there’s more than one thread discussing these temperature problems in Armbian forum so that would be the first place to look…

Hanzala
Hanzala
7 years ago

everything works fine but when i try to install google assistant library using the code above it shows lots of erros in red colour and the library does not downloads.is it because of my internet connection or something else?plz help

Hanzala
Hanzala
7 years ago

ok thats solved but i am not able to copy the client secret file.how to do it?

Hanzala
Hanzala
7 years ago

(env) pi@orangepizero:~$ google-assistant-demo
usage: google-assistant-demo [-h] [–credentials OAUTH2_CREDENTIALS_FILE]
google-assistant-demo: error: argument –credentials: No such file or directory: “/home/pi/.config/google-oauthlib-tool/credentials.json”

i am getting this error.what do i do????plz help

Hanzala
Hanzala
7 years ago


so do i have to install new copy of armbian and start from start?

TomSp
TomSp
7 years ago

Hi
I’m trying to do this project on a Orange Pi PC, google assistant recognizes my voice pretty good but apparently there is a problem with my speakers, I keep getting ‘ ALSA lib pcm.c:7963:(snd_pcm_recover) underrun occurred ‘
Any idea how to solve this?

Sam
Sam
7 years ago

(env) pi@orangepizeroplus2:~$ python -m pip install –upgrade google-assistant-library
Collecting google-assistant-library
Could not find a version that satisfies the requirement google-assistant-library (from versions: )
No matching distribution found for google-assistant-library
(env) pi@orangepizeroplus2:

I am getting above error. Not able to install google-assistant-library
I am using orange pi zero plus 2 H5 with following config
Welcome to ARMBIAN 5.27.170614 nightly Ubuntu 16.04.2 LTS 4.11.1-sun50iw2

Alexander
Alexander
7 years ago

Hello to all, i hope you are doing well. Great tutorial, good job 😉 I lunch my assistant and work perfectly fine on cubieboard A10 a.k.a (1) with Armbian_5.31_Cubieboard_Debian_jessie_next_4.11.6 🙂 Now i want when i say “OK Google” or “Hey Google” some indication whether she hears, led or sound … something that let me know she is ready for me 😀 Try this : ” August 17th, 2017 at 06:11 | #33 Reply | Quote To get the beep back you can change the __main__.py file in /env/lib/python3.5/site-packages/google/assistant/ i added the following lines import os if event.type == EventType.ON_CONVERSATION_TURN_STARTED: os.system(‘/usr/bin/aplay… Read more »

Gung Sukma
Gung Sukma
7 years ago

cnxsoft : @gungsukma The real Google Home can be used with IFTTT. But the Google Assistant SDK not. You’d have to dig into the source code and your device API to enable this. The Google Assistant SDK can be used with IFTTT, too (https://developers.google.com/assistant/sdk/develop/python/next-steps#device-control) but I guess I can just use the text transcript by adding something on /env/lib/python3.5/site-packages/google/assistant/__main__.py ” Get the transcript of the user request The Google Assistant SDK gives you a text transcript of the user request. Use this to provide feedback to the user by rendering the text to a display, or even for something more… Read more »

Hanzala
Hanzala
7 years ago

jarvis@orangepizero:~$ sudo systemctl enable google-assistant-demo.service
Failed to execute operation: No such file or directory
jarvis@orangepizero:~$ sudo systemctl start google-assistant-demo.service
Failed to start google-assistant-demo.service: Unit google-assistant-demo.service not found.

i am getting this error

Yuyu
Yuyu
7 years ago


Hi cnxsoft,
Can you please explain in details. I cannot make the sound feedback working.
Where and how can I call aplay. What is the “right location” ? And how can I know the full path of a file ?
Thank you !

Yuyu
Yuyu
7 years ago

Hi cnxsoft,

Thanks for your fast reply.
My problem was having the assistant running automatically from reboot. When I disabled this option and ran the assistant manually, the .wav worked.

Yuyu
Yuyu
7 years ago

By the way, do you have any idea how to automatically run google assistant at each reboot, but still being able to open wav files ?

Yuriy Karpovv
Yuriy Karpovv
7 years ago

Thanks for your post!

But what about built-in microphone? Can anybody use it with built-in microphone?
What is the content of .asoundrc in this way?

Eric
Eric
7 years ago

i cant really get the client_secret to work, i always get an error message, it was posted a couple of times in the comments already but i cant figure it out. I downloaded the file and what do i do now? (ive downloaded winSCP aswell but dont know where to put the file). It would be nice if you guys helped me out a bit.
Thanks!

mrshark
6 years ago

installed latest armbian 5.35 xenial on orange pi zero, i was going to setup this, but something seems missing… i’ve the addon board, with mic and 3.5 jack output
root@orangepizero:~# arecord -l
arecord: device_list:268: no soundcards found…
root@orangepizero:~# lspci
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
root@orangepizero:~# alsamixer
cannot open mixer: No such file or directory

tkaiser
tkaiser
6 years ago

@mrshark
If ‘latest Armbian’ involves also mainline/4.13 kernel then you need to look here: docs.armbian.com/Hardware_Allwinner_overlays/

happyhippy
happyhippy
6 years ago

worked great on my orangepi useing Armbian_5.35_Orangepizero_Ubuntu_xenial_default_3.4.113 .just followed your guide and bingo .. cheers

Dag Hovden
Dag Hovden
6 years ago

Great tutorial, thank you!

Almost at the end I’m running into a problem though: when issuing google-assistant demo I get this

“the following arguments are required: –device-model-id”

I have tried to find out how to specify this but in doing so I encounter another problem: the command google-assistant-devicetool gives me “command not found” and that is the one, if I get understand it correctly, I should use to set device model.

I don’t see device model anywhere in your tutorial so I’m a bit mystified – what am I missing?
Answers, suggestions, ideas are all very welcome 🙂

regards,
Dag

bedfellow
bedfellow
6 years ago

@Jorg Muskens Where abouts in the script would this be added?

@Dag Hovden
Add it to the end of the start command, i.e:

From what I can ascertain, it doesn’t matter what you call it.

francis
francis
5 years ago

thank for this, but now:
(env) fran@pihome:~$ google-assistant-demo –device_model_id=”Orange_Pi_Lite_Smart_Speaker”
Segmentation fault

yes, segmentation fault…..

Akki
Akki
6 years ago


Hello a newbie question
I intent to make and use this for home automation(control a few sonoff or something similar) can I use google home app with this? what happens if I cut the power? Will I have to SSH into it and start it again or is just plug and play?

ÁLVARO
ÁLVARO
6 years ago

Hi, I’m having a problem. Where does Run the authorization tool (google-oauthlib-tool –client-secrets ~ / client_secret_xxxx.) Client secret_xxx be clien id on both sites? I hope someone resolves a greeting if you also know a vido tutorial please send it.

Rana Saha
6 years ago

nothing happened after
sudo systemctl enable google-assistant-demo.service
sudo systemctl start google-assistant-demo.service

Rana Saha
6 years ago

Thank you for your quick response.It does not show any error messages. As per your tutorial Google assistant demo will start after
sudo systemctl enable google-assistant-demo.service
sudo systemctl start google-assistant-demo.service
But in my case it did not start.
Should I have to add –device_model_id =”xxxx” at anywhere in the code?
As I had writeen
Google-assistant-demo –device_model_id =”xxxx”
When I am starting it manually.

Thanks.

Rana Saha
6 years ago

when I disconnect the putty, the device does not respond. Also unable to automatically start the google assistant. Any help please.

Rana Saha
6 years ago

Thanks for your reply.
I had changed that line in google-assistant-demo.service:

ExecStart=/home/pi/env/bin/google-assistant-demo

to add my device_module_id to the command line.
The following line:
ExecStart=/home/pi/env/bin/google-assistant-demo –device_model_id =”xxxx”

But it does not work, can u guide me to create a script with the working command, and append it to ExecStart.

Thanks a lot

Rana Saha
6 years ago

not working

Rana Saha
6 years ago

I can run assistant-start.sh from command line, and it worked. But did not work after reboot.

Rana Saha
6 years ago

systemctl log
**********************
pi@orangepizero:~$ sudo systemctl start google-assistant-demo.service
pi@orangepizero:~$ systemctl –no-pager -l status start google-assistant-demo
● start.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

● google-assistant-demo.service – google assistant service
Loaded: loaded (/etc/systemd/system/google-assistant-demo.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Fri 2018-05-25 18:27:30 IST; 1min 1s ago
Process: 2359 ExecStart=/home/pi/env/bin/assistant-start.sh (code=exited, status=203/EXEC)
Main PID: 2359 (code=exited, status=203/EXEC)
pi@orangepizero:~$

Rana Saha
6 years ago

BINGO! Now it’s working….
assistant-start.sh will be

the “#” and “-” were missing

Thanks a lot for your support.

Rana Saha
6 years ago

now I want to play music from google play music in this device. How to do this?

Rana Saha
6 years ago

ANY IDEA TO PLAY MUSIC FROM IT.
PLS GUIDE.

ArduinoPi
ArduinoPi
6 years ago

i can’t make a feedback sound like ‘ding’ on google assistant sdk. Can you help me?

francis
francis
5 years ago

hello, i have a small probem when i launch google assistant demo :

Traceback (most recent call last):
File “/home/fran/env/bin/google-assistant-demo”, line 10, in
sys.exit(main())
File “/home/fran/env/lib/python3.5/site-packages/google/assistant/library/__main__.py”, line 119, in main
raise Exception(‘Missing –device-model-id option’)
Exception: Missing –device-model-id option

But, all is fine…. wtf ?

Boardcon Rockchip and Allwinner SoM and SBC products