Home > Allwinner H-Series, Audio, Hardware, Linux, Testing, Ubuntu, Video > How to Setup an Orange Pi Zero DIY Smart Speaker with Google Assistant SDK

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.

  1. Jon Smirl
    July 30th, 2017 at 19:59 | #1

    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 different angle and the mic array will remove it from the audio input and only focus on the person speaking. With a single mic there is no noise removal.

    ESP32 has ability to have 2 mics. With some code it can be turned into a cheap array mic chip. Dedicated array mic chips are about $7.

  2. Fossxplorer
    July 30th, 2017 at 20:52 | #2

    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?

  3. tkaiser
    July 30th, 2017 at 21:01 | #3

    Fossxplorer :
    Does this work on a Orange Pi Lite?

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

    • Squalazzo
      July 30th, 2017 at 23:26 | #4

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

  4. July 30th, 2017 at 21:36 | #5

    @Jon Smirl
    Don’t know about multiple mic support.
    “OK Google” works even 10 meters away with that setup. Maybe the microphone being outside the box helps too. I think it picks up 95% of my “OK Google” requests.

    I did not have a TV playing at the same time, or much of other audio at the same time, as you explain that’s when the noise cancellation helps the most.

  5. July 30th, 2017 at 21:39 | #6

    @Fossxplorer
    All you need is audio input and output, and network connectivity.
    With Orange Pi Lite, you’d still need a USB sound card with output for your speaker, and maybe including a microphone too, since I’m not sure the mic on Orange Pi Lite will work, as I had troubles with the one in Orange Pi Zero.

    I’m using a 32GB micro SD card in my setup. You can get something smaller if you want too.

  6. Kaiyoti
    July 31st, 2017 at 06:53 | #7

    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.

  7. aquilegia
    July 31st, 2017 at 08:52 | #8

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

  8. July 31st, 2017 at 10:03 | #9

    @Squalazzo
    Memory usage on mine with the demo running:

    It should be no problem with 256MB RAM.

  9. July 31st, 2017 at 10:05 | #10

    @Kaiyoti
    WiFi is pretty stable on mine. I can use it all day.
    However, yesterday I lost ssh access at one point, and when pinging the host seems down. But I was still able to use Google Assistant. Very odd problem. A reboot fixed that.

  10. July 31st, 2017 at 10:05 | #11

    Thank you @aquilegia !
    It works perfectly with the built-in microphone now. I’ll update the post accordingly.

  11. Paul
    July 31st, 2017 at 10:27 | #12

    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.

  12. July 31st, 2017 at 10:30 | #13

    @Paul
    It’s not that bad. I was just expecting less steps in the Google Cloud console.

  13. tkaiser
    July 31st, 2017 at 12:17 | #14

    @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 network manager. At least we had several reports affecting various boards reporting the same and establishing Wi-Fi the old way with wpa_supplicant seems to fix it. Some users reported they would be only locked out from Windows boxes while with Linux they would still be able to SSH in. I was never able to reproduce (all my productive hosts running macOS and I didn’t extensively test). Also issue seemed to be gone with mainline kernel –> Bottom of ‘Orange Pi Lite SSH Problems’ thread in Armbian forum.

  14. dgp
    July 31st, 2017 at 13:28 | #15

    @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. 😉

  15. aquilegia
    July 31st, 2017 at 17:34 | #16

    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.

  16. tkaiser
    August 1st, 2017 at 01:18 | #17

    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 so f*cking easy: put your OPi Zero 2 m away from the AP and use ‘iperf3 -s’ on a wired host connected to the same AP/router, use ‘iperf3 -c’ and ‘iperf3 -c -R’ to test TCP/IP bandwidth, done. Takes 5 minutes max but no one spends this amount of time. I already though about ordering another OPi Zero but it feels somewhat stupid trying this on my own since everyone can contribute that easy.

  17. tkaiser
    August 1st, 2017 at 01:18 | #18

    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 Armbian since we chose by default to use ‘IoT settings’ on those small H3 devices focusing on low consumption and underclock DRAM massively).

    Which OS image are you currently using on your Zero? Just asking since still some vendor OS images for H2+/H3 devices use Allwinner’s crappy thermal/throttling settings leading to killed CPU cores once throttling occured the first time. In case you’re not using Armbian better check from time to time with

  18. tkaiser
    August 1st, 2017 at 13:28 | #20

    @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 of NEON or not.

    If we’re talking about NEON then ARMv6/ARMv7 CPU cores have a clear disadvantage and moving from an OPi Zero or NanoPi NEO to an ‘OPi Zero Plus 2 H5’ or ‘NanoPi NEO 2′ or NanoPi NEO Plus 2’ (how I hate these stupid names!) could solve performance issues simply by switching from ARMv7 (H2+/H3/BCM2386) to ARMv8 (H5/BCM2387).

    • Athar
      August 2nd, 2017 at 00:52 | #21

      @tkaiser

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

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

  19. Drone
    August 1st, 2017 at 20:17 | #22

    @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 used the XMOS xCore chips that are used on these array mic boards before, but for other applications. The XMOS chips are nice once you get familiar with programming a commutating parallel processor, but the bad XMOS documentation and user-hostile implementation of their Eclipse-based IDE made working with the XMOS parts painful (in my opinion). BTW, if I remember correctly XMOS is based in the UK.

    Thanks & Regards, David

  20. August 2nd, 2017 at 14:56 | #23

    @tkaiser
    In my setup (About 3 meters away + thin wall):

  21. August 2nd, 2017 at 16:29 | #24

    @cnxsoft
    and Tx direction:

  22. tkaiser
    August 2nd, 2017 at 22:45 | #25

    @cnxsoft
    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).

  23. Jens
    August 4th, 2017 at 16:44 | #26

    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

  24. August 4th, 2017 at 16:49 | #27

    @Jens
    There must be an error in .asoundrc configuration file. Double check the output of arecord -l matches the content of your config file.

  25. August 6th, 2017 at 15:22 | #28

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

  26. OrangePro
    August 15th, 2017 at 11:26 | #29

    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.

  27. August 15th, 2017 at 11:28 | #30

    @OrangePro
    That just means one of the path in the command line is incorrect, either the source file in your host PC, or the destination directory in Orange Pi Zero.

    Another possibly is some special characters in your_ client_id in which case you need to escape the file name

  28. OrangePro
    August 15th, 2017 at 11:49 | #31

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

  29. August 15th, 2017 at 14:05 | #32

    @OrangePro
    So you’ve already copied the file to Orange Pi Zero successfully, and it’s just not finding the file when you run the command with google-oauthlib-tool? It should just be client_secret_xxxxx.json path/filename is wrong then.

  30. Jorg Muskens
    August 17th, 2017 at 06:11 | #33

    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 google_now_voice.wav &’)
    print()

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

  31. Orange
    August 17th, 2017 at 07:05 | #34

    @cnxsoft
    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
    [email protected]:~#

    Thanks for any step by step help to this problem.

  32. August 17th, 2017 at 09:07 | #35

    @Orange
    Are you running that command in Orange Pi Zero?
    You need to run it in the computer where you downloaded the file. If you are using Windows, then using Windows Susb-system for Linux to type the command, or maybe simpler, WinSCP.

  33. August 17th, 2017 at 09:29 | #36

    @Jorg Muskens
    Thanks useful tip!

  34. Orange
    August 22nd, 2017 at 08:36 | #37

    @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 still worked without source env/bin/activate and google-assistant-demo, but got no reply.

    So, I thought I’d re-type sudo systemctl enable google-assistant-demo.service and sudo systemctl start google-assistant-demo.service on the client program, but it now results in this:

    Failed to start google-assistant-demo.service: Unit google-assistant-demo.service is not loaded properly: Invalid argument. See system logs and ‘systemctl status google-assistant-demo.service’ for details.

    So, I thought I’d delete the /etc/systemd/system/google-assistant-demo.service file on WinSCP and re-do everything again, before I asked you guys for help, but I’m not able to do this because:

    General failure (server should provide error description).
    Error code: 4
    Error message from server: Failure

    Common reasons for the Error code 4 are:
    – Renaming a file to a name of already existing file.
    – Creating a directory that already exists.
    – Moving a remote file to a different filesystem (HDD).
    – Uploading a file to a full filesystem (HDD).
    – Exceeding a user disk quota.

    I also tried removing it via command, but can’t because:

    /root$ rm /etc/systemd/system/google-assistant-demo.service
    rm: cannot remove ‘/etc/systemd/system/google-assistant-demo.service’: Read-only file system

    How do I change access permission to the file, so that I can delete it (chmod 7, chmod 777 doesn’t do anything)?

    Thanks for any help.

  35. August 22nd, 2017 at 09:13 | #38

    @Orange
    Better only use WinSCP for the transfer of the file from your PC, and use the terminal for everything.
    As for you need error it looks like the file system may be mounted read-only due to corruption.

    mount command with no option should show the list of mounts with the mount status (ro = read-only, rw = readwrite).

  36. abel
    August 25th, 2017 at 08:19 | #39

    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/”
    [email protected]:/home/pi# source env/bin/activate
    (env) [email protected]:/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’

  37. August 25th, 2017 at 09:05 | #40

    @abel
    You may need to install pyA20 module. Something like pip install pyA20

  38. saon
    August 25th, 2017 at 09:05 | #41

    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 to no avail. I even tried to power the unit with a battery powerbank and I still got the static noise.

    Any suggestion on how to fix this, or is this a hardware problem? Or maybe it is mono only? I’m afraid that it would cost more to return my unit then to get a new one 🙁

  39. August 25th, 2017 at 09:38 | #42

    @saon
    I’ve just tried again myself, and I can confirm I have audio on both speakers.
    One reason could be the type of plugs you use. This is the one i use:

  40. saon
    August 25th, 2017 at 10:00 | #43

    @cnxsoft

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

  41. August 25th, 2017 at 10:26 | #44

    @saon
    That one is standard too, but the number of “rings” may differ between different plugs.
    If you have pushed it all the way, try to pull it out a little and see what happens. Maybe play music through the speaker, and adjust the plug position step by step to check if both speakers output audio.

  42. SaOn
    August 26th, 2017 at 11:13 | #45

    @cnxsoft

    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?

  43. August 26th, 2017 at 11:33 | #46

    @SaOn
    Several solutions to your last point:
    1. Connect a USB to TLL debug to access the serial console in your location
    2. Connect the board to a TV via the AV port
    3. Setup an access point with armbian-config, then use your phone or PC in your office to connect to the board, and connect to your router
    4. Manually edit to configuration files before moving to office (not sure where that is yet)

  44. Jatinder Arora
    August 28th, 2017 at 15:37 | #47

    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 Ubuntu
    Open Wifi Configuration file
    1. sudo nano /etc/network/interfaces
    #Paste the following lines
    auto lo
    iface lo inet loopback

    auto eth0
    allow-hotplug eth0
    iface eth0 inet dhcp

    allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp

    #Open WIFI Config File
    2. sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

    # Copy and paste the following and set your SSID and PASSWORD
    network={
    ssid=”Your_Wifi_SSID”
    psk=”Your_wifi_password”
    }

    #Turn Wifi ON
    3. sudo ifup wlan0

    #Update Time Zone
    4. sudo dpkg-reconfigure tzdata

    Regards…

  45. Flo
    September 13th, 2017 at 02:11 | #48

    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 🙁

  46. September 13th, 2017 at 09:14 | #49

    @Flo
    When I ask it whether I can speak other languages, it just says something similar to “I’m learning”.
    However, it might be possible to set the language as mentioned @ https://stackoverflow.com/questions/44192475/does-google-assistant-sdk-support-for-other-languages?answertab=active#tab-top

    • Flo
      September 13th, 2017 at 12:17 | #50

      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!

  47. September 13th, 2017 at 14:12 | #51

    @Flo
    I could not change the imperial system to metric, but could change °F to °C. Just tell it to use Celsius after asking for the weather for example.

  48. Fleder
    September 16th, 2017 at 01:26 | #52

    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.

  49. September 16th, 2017 at 09:31 | #53

    @Fleder
    You’d need to check the content of “env/bin/activate” script to find out why permission may be denied, and change the permissions.

  50. Fleder
    September 16th, 2017 at 21:51 | #54

    @cnxsoft
    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.

  51. September 17th, 2017 at 10:15 | #55

    @Fleder
    Yes and yes. If you can not find a clue of the permission issue with error message and checking the content of the script, you may want to run it with strace: https://www.cnx-software.com/2012/07/06/quick-binary-debugging-on-linux-with-strace-system-call-tracer/

  52. Max
    September 22nd, 2017 at 15:37 | #56

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

  1. No trackbacks yet.