Play Radio on New Version of Raspberry Pi AIY Project
|If you are using a version of the AIY Project version aiyprojects-2017-09-11.img or newer you will have found that the mods I wrote to play radio no longer work.
The new version can be found at: https://github.com/ktinkerer/aiyprojects-raspbian/tree/voicekit/src
To play radio you need to the radio_mod.py and the vlc.py files, add these to your src folder. You also need vlc to be installed on the pi.
sudo apt-get update
sudo apt-get install vlc
Start radio_mod.py in the virtualenv in the same way as running the demo scripts, either in the dev terminal or by running env/bin/python3 -u src/radio_mods.py
from the aiyprojects folder.
The radio can be stopped by pressing the button, or by saying “radio off” (if the pi can hear you over the sound of the radio playing, I find this depends on the station you are listening to).
If you are outside the UK you will need to change the radio urls to ones that are accessible outside the UK, there are more details on my original post: https://ktinkerer.co.uk/play-bbc-radio-raspberry-pi-aiy-project/
Have downloaded radio_mod.py and vlc.py and installed vlc.
On line 96:
instance = vlc.Instance()
I’m getting an error ‘module’ object has no attribute ‘Instance’
Is vlc.py in the same folder as radio_mod.py? Is it executable?
chmod +x vlc.py
It is in the same folder but wasn’t Executable. I have changed that but still have the same problem. Is the same if I run vlc.py. The error comes when I say “OK Google Radio On”
Is there any more info in the log?
Where do I find the logfile?
Sorry I wrote log file then changed it to log because I meant journalctl:
sudo journalctl -u voice-recognizer -xe
seems to be empty
Ok, does it say anything else when it comes up with the error? How are you running radio_mod.py? Did the demo files supplied work?
I have the original AIY supplied scripts in the /src folder except for radio_mod.py and vlc.py.
All the demos work apart from cloudspeech_demo-py which falls over because cloud_speech.json is missing.
radio_mod works until I mention the radio. (Play Radio). I cant send a screendump, but the messages are:
You said: play radio
INFO:root:Radio command received: play radio
ERROR:root:Error finding station play
INFO:root:Playing radio: http://a.files.bbc1.co.uk/mediafesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8
Trtaceback (most recent call last):
File “src/radio_mod.py”, Line 153 in module main()
File “src/radio_mod.py”, Line 149 in module main()
File “src/radio_mod.py”, Line 128 in process_event)
File “src/radio_mod.py”, Line 96 in radio instance – vlc.Instance()
AttributeError: ‘module’ object has no attribute ‘Instance’
Did you get any further with this? Sorry about the delay, I’ve been on holiday. I’ve just had chance to retest it and I can’t figure out what is going wrong for you. It doesn’t seem to be importing the vlc module correctly which it should do if it is in the same folder as the radio_mod.py.
Have downloaded both files and it works great. Need to add Classic FM to the list of stations but have run into an issue. Added:-
‘classic’: ‘http://media-ice.musicradio.com/ClassicFMMP3.m3u’,
to the list but whilst it works fine on my desktop it does not on the pi. Errors reported on screen are:-
[2018-01-09 14:03:05,424] INFO:root:Radio command received: radio classic
[2018-01-09 14:03:05,425] INFO:root:Playing radio: http://media-ice.musicradio.com/ClassicFMMP3.m3u
[00991690] pulse audio output error: PulseAudio server connection failure: Connection refused
[0093bef8] pulse audio output error: PulseAudio server connection failure: Connection refused
[73300c40] es demux error: cannot peek
[73300c40] es demux error: cannot peek
[2018-01-09 14:03:05,424] INFO:root:Radio command received: radio classic
[2018-01-09 14:03:05,425] INFO:root:Playing radio: http://media-ice.musicradio.com/ClassicFMMP3.m3u
[00991690] pulse audio output error: PulseAudio server connection failure: Connection refused
[0093bef8] pulse audio output error: PulseAudio server connection failure: Connection refused
[73300c40] es demux error: cannot peek
[73300c40] es demux error: cannot peek
Any thoughts would be appreciated.
Try http://media-the.musicradio.com:80/ClassicFMMP3 I’ve just tested that stream and it worked for me. Hope that helps.
Hi,
Thanks for the info, it works at treat!
Have just downloaded the files again and this time the radio is working. There are a few errors as mentioned by someone else in this stream, but I can hear music!
Thanks
I’m glad it’s working now!
New to this confused, I copied the files to src (radio_mod.py and vlc.py) restarted the src/assistant_library_demo.py script. assitant does not understand any radio commands, just get unable to help with that. what have i missed?
You need to run radio_mod.py instead of the demo script for the radio commands to work.
cool thanks
Can we radio_mod.py be added/merged with the demo script? Or is this reduntant?
Is there a rule or type of stream this will not play? getting error someone else reported;
[00991690] pulse audio output error: PulseAudio server connection failure: Connection refused
[0093bef8] pulse audio output error: PulseAudio server connection failure: Connection refused
[73300c40] es demux error: cannot peek
[73300c40] es demux error: cannot peek
for http://media-ice.musicradio.com/Heart80sMP3.m3u among others. is there a limitation of what streams are compatible etc?
m3u is a playlist file, if you open it it contains http://media-the.musicradio.com:80/Heart80sMP3 so try that. You can test which files will work by using cvlc on the command line so
cvlc http://media-the.musicradio.com:80/Heart80sMP3
I’ve just tested it and that works for me.Hi, the radio doesn’t seem to be working for me. It fetches the right radio but then it shows
[72b05e28] http access error: error: HTTP/1.1 403 Forbidden
[72b05e28] http access error: error: HTTP/1.0 403 Forbidden
[72b05e28] access_mms access error: error: HTTP/1.0 403 Forbidden
[72b058b0] core stream error: no suitable access module for `http://as-hls-uk-live.akamaized.net/pool_7/live/bbc_radio_nottingham/bbc_radio_nottingham.isml/bbc_radio_nottingham-audio%3d320000.norewind.m3u8′
[72b058b0] httplive stream error: No playable streams found in Meta playlist
[72b05e28] es demux error: cannot peek
Is this VLC error or the stream is corrupt?
I fixed it using these updated list of radio stations instead:
http://www.suppertime.co.uk/blogmywiki/2015/04/updated-list-of-bbc-network-radio-urls/
Are you in the UK? The ones I used won’t work outside the UK.
Thank you very much for the radio files and instructions – my aiy voice kit is now providing a great radio service.
All I am told is “permission denied” when I try to run radio_mod.py. I copied the file to another computer, then put it on a flash drive and dropped it into the src folder on the pi. Have I done something wrong?
Thanks.
Which user owns the files? It should be user pi, group pi. ls -l /pathtosrc should tell you who owns them, chown pi:pi /pathtofile (you made need to run this with sudo) will change the owner and group. Hope this helps!
Did as you suggested, it is listed as pi pi.
I changed permissions in the file (execute was set to nobody). Still not possible to run it though. Now it simply denies the file exists (no such file or directory).
Perhaps the steps need to be laid out clearer – do I need to sudo install (is it sudo apt-install?) this file, rather than simply copy and paste it from another computer?
Sorry, I am a bit of a newbie and not sure I understand why placing the file in the folder makes it inaccessible, but perhaps doing something else, like sudo apt, makes it run (if it does).
Thanks for your help.
No need to install the file, it’s a python script and python should already be installed as part of the setup process of the kit, you just need to install vlc. Have you got the included examples in the src file to work? You need to start the radio_mod.py file in the same way, using the dev terminal as in these instructions https://aiyprojects.withgoogle.com/voice/#users-guide-3-1–start-the-assistant-library-demo-app
This is a great page, Mr Tinkerer! Some useful insight from your replies in these comments too. Thank you for sharing your knowledge.
Hi,
I got this error message.
(env) pi@raspberrypi:~/AIY-voice-kit-python $ src/radio_mod.py
Traceback (most recent call last):
File “src/radio_mod.py”, line 156, in
main()
File “src/radio_mod.py”, line 149, in main
with Assistant(credentials) as assistant:
TypeError: __init__() missing 1 required positional argument: ‘device_model_id’
Can I fix it?
Sorry about the delay in replying, do the demo scripts work? If so run the radio_mod.py script in the exactly the same way as the demo.
I’ve got the same problem, the assistant demo works fine, but the radio_mod give the error
It looks like they’ve made some modifications to the aiyproject since I wrote this, try changing the main function at the bottom so that it is the same as in their demo script https://github.com/google/aiyprojects-raspbian/blob/voicekit/src/assistant_library_with_local_commands_demo.py
Hope that works!
Hi, I used Google Assistant on Raspbian from raspberrypi.org to set up the system on a rpi3. It works fine. Your radio input seemed great – I have followed the steps but hit an error – env/bin/python3 -u src/radio_mods.py gives the return env/bin/python3 no such file or directory. However it works when I add env/bin/activate. Then I hit the error radio_mod.py line 25 no module named subpocess. How do I add that? Thanks for any help!
Is it a typo? subprocess is built in. It’s not actually used in the radio part of it, I modified assistant_library_with_local_commands_demo.py and it is part of that. You could try removing the power_off_pi() reboot_pi() and say_ip() functions if it’s still not working.
Hi thanks for the fast response. It was not a typo – I have changed it to subprocess. Just to clarify I have tried at the /src folder this command: source env/bin/activate
python3 radio_mod.py
Now I get error at line 147 saying I am missing device_model_id.
Do you want me to remove power_off etc (in your comment above) from the radio_mod.py? Incidentally I could not see assistant_library_with_local_commands_demo_py – which folder is it in. Thanks for all the help – it is much appreciated.
You only need to remove it if you are still getting subprocess errors, although subprocess is built in to python so it’s an odd error to get. I’ve no idea about running it with env/bin/activate is that how you have got the demo scripts to work? The demo script I modified is here: https://github.com/google/aiyprojects-raspbian/blob/voicekit/src/assistant_library_with_local_commands_demo.py
I realised yesterday that they have made modifications since I last looked at this and you can try changing the main function at the bottom to be the same as in that link. Hopefully this will work as I’m not going to have time to properly modify the files for a few weeks, I’m on holiday!
Hi Sorry to disturb you on holiday. I will try your ideas and let you know in a few weeks how it went. Have a good time!
Hi
I tried using a fresh up-to-date image from Github and I also tried my Rasbian Guide – https://www.raspberrypi.org/forums/viewtopic.php?t=204865.
No success with either. I can get GA to work with both but they will not take radio_mod.py – I get a variety of errors. Is there a way to do this? Thanks Fred
Good timing, I’ve just got back from holiday! I haven’t tried the latest github image. What are the errors you are getting?
Hi
Hope you had a good holiday! The errors occur when I try the commands: source env/bin/activate
python3 src/radio_mod.py
Or variations on these – ie drop activate. The software then starts checking (I guess) and always hits an error – usually around google assistant not having some detail. It was a few weeks ago now and I did not make notes at the time! Can main.py (which I run to use GA voice) and radio_mod.py both work at the same time?
If you want me to try and reproduce the error I can do so sometime next week.
Best Regards Fred
They won’t both run together, you need to stop one before you start the other one. I’d definitely need some details about the errors to work out why it’s not working.
Okay – I did not stop main.py! If I only run radio_mod.py does that mean that I cannot get GA to set alarms, timers, search wikipedia etc?
I will try again with a new GitHub image and give you some more details on what happens.
Best Regards Fred
No it will still do the other GA things. You can add multiple mods but need to add them all to the same file and just run one.
Great. I will try it tomorrow!
Hi I tried taking a new image from Github and followed the directions. I got to a successful authorisation code acceptance but failed on error in radio_mod.py. See below. Any thoughts? Thanks
1 Downloaded image 2018-08-03 as img.tz
2 Burn image to SD card and start RPI see: https://github.com/google/aiyprojects-raspbian/blob/aiyprojects/HACKING.md
3 Followed instructions on monitor at AIY Projects screen.
4 Set user pi and password
5 Enabled VNC
6 Did sudo apt-get update and sudo apt-get dist-upgrade to be sure I was up to date.
7 Added vlc
8 Checked audio via terminal. Could not follow – aplay and arecord gave same answer – Pulseaudio is in control I guess.
9 Carried on adding radio_mod.py and vlc.py and assistant.json to correct folders
10 Started GA with env/bin/python3 -u src/radio_mod.py
11 Error env/bin/python3 – no file or directory.
12 Tried source env/bin/activate
python3 src/radio_mod.py
13 This worked better but hit error: pi@raspberrypi:~/AIY-projects-python $ env/bin/python3 -u src/radio_mod.py
-bash: env/bin/python3: No such file or directory
pi@raspberrypi:~/AIY-projects-python $ source env/bin/activate
-bash: env/bin/activate: No such file or directory
pi@raspberrypi:~/AIY-projects-python $ python3 src/radio_mod.py
Traceback (most recent call last):
File “src/radio_mod.py”, line 157, in
main()
File “src/radio_mod.py”, line 149, in main
credentials = aiy.assistant.auth_helpers.get_assistant_credentials()
File “/opt/aiy/projects-python/src/aiy/assistant/auth_helpers.py”, line 132, in get
_assistant_credentials
return _try_to_get_credentials(credentials_file)
File “/opt/aiy/projects-python/src/aiy/assistant/auth_helpers.py”, line 123, in _tr
y_to_get_credentials
credentials = _credentials_flow_interactive(client_secrets)
File “/opt/aiy/projects-python/src/aiy/assistant/auth_helpers.py”, line 70, in _cre
dentials_flow_interactive
scopes=[_ASSISTANT_OAUTH_SCOPE])
File “/usr/local/lib/python3.5/dist-packages/google_auth_oauthlib/flow.py”, line 17
2, in from_client_secrets_file
client_config = json.load(json_file)
File “/usr/lib/python3.5/json/__init__.py”, line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File “/usr/lib/python3.5/json/__init__.py”, line 315, in loads
s, 0)
json.decoder.JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 c
olumn 1 (char 0)
13 Edited assistant.json directly on RPI via nano and copied contents of assistant.json stored as Notepad file.
14 This seemed to work better as I got to authorisation code but failed after that:
Enter the authorization code: 4/QQDrM3h7LentUmon_H2Ki12jailWAp3Q4zLeo7kM8w1mLDXSopJBc
jE
[2018-08-20 15:50:24,363] INFO:root:OAuth credentials initialized: /home/pi/.cache/vo
ice-recognizer/assistant_credentials.json
Traceback (most recent call last):
File “src/radio_mod.py”, line 157, in
main()
File “src/radio_mod.py”, line 150, in main
with Assistant(credentials) as assistant:
TypeError: __init__() missing 1 required positional argument: ‘device_model_id’
15 As this assistant.json works with the main.py from my usual GA installation I am not sure what is missing.
You shouldn’t need to redo everything every time, once the example and everything is working you only need to change the radio_mod.py file. Did you update the main function at the bottom of the file to be the same as in this link https://github.com/google/aiyprojects-raspbian/blob/voicekit/src/assistant_library_with_local_commands_demo.py as I said before it seems they have made some updates since I last looked at this mod and I have not had chance to change this mod to reflect that yet.
Thanks for the fast response – no I did not change the demo file but I will and let you know.
Hi – alter radio_mod.py at end (section on “main”). Restarted with source env/bin/activate python3 src/radio_mod.py however hit new error. Yours Fred
Traceback (most recent call last):
File “src/radio_mod.py”, line 157, in
main()
File “src/radio_mod.py”, line 150, in main
model_id, device_id = aiy.assistant.device_helpers.get_ids(credentials)
AttributeError: module ‘aiy.assistant’ has no attribute ‘device_helpers’
Try adding
import aiy.assistant.device_helpers
to the imports at the top.Hi Altered import as requested – same error:
pi@raspberrypi:~/AIY-projects-python $ source env/bin/activate
bash: env/bin/activate: No such file or directory
pi@raspberrypi:~/AIY-projects-python $ python3 -u src/radio_mod.py
Traceback (most recent call last):
File “src/radio_mod.py”, line 158, in
main()
File “src/radio_mod.py”, line 151, in main
model_id, device_id = aiy.assistant.device_helpers.get_ids(credentials)
AttributeError: module ‘aiy.assistant.device_helpers’ has no attribute ‘get_ids’
It seems that the command no longer goes to the env prompt – is this important?
Yours Fred
I use
env/bin/python3 -u src/radio_mods.py
to run it. Can you still run the demo files? You need to run this in the same way.Hi I never got this command to work with radio_mod.py – I always get no file or directory error. I always needed env/bin/activate etc to get the Raspbian GA guide to work and that seemed a better command line for radio_mod.py.
I have never tried the demo files! These commands and env etc are all a complete mystery to me.
I am away now – back Wednesday and can try the demo files then.
How are you running the Google Assistant?
Hi I type:
source env/bin/activate
python3 src/main.py
in the AIY-projects-python folder.
Have not tried this with the current setup I have been sharing with you but I can try this tomorrow as well as try the demo file. Yours Fred
Hi No success. Demos.py would not work and I could not even get main.py to work so going backwards.
I thought about using dietpi and installing google assistant that way but no success with that approach.
This installation of google assistant needs some clarification. Any ideas on a good way to do it? Thanks Fred
Hi I noticed this on Github: https://github.com/t1m0thyj/AssistantPi – I will try it. In the write up it says it cannot play music – but could I just add radio_mod.py to the src folder? Thanks
Sorry about the delay in replying!
If you were using main.py were you using the old version of the aiyprojects code? https://github.com/google/aiyprojects-raspbian/tree/master ? The radio_mod.py file is to be used with the new version https://github.com/google/aiyprojects-raspbian/tree/voicekit There is a radio mod available that I wrote (a long time ago!) for the old version, I am not sure if it still works but you could try it https://github.com/ktinkerer/aiyprojects-raspbian/blob/radio_player/src/action.py
When I set mine up I used the aiyprojects image to set up the sd card, I think if you are using the voice hat it is set up ready to work with that so I would recommend that route. Get the demo scripts provided working before you try to get any mods working. I haven’t tried the method you linked to. For general support with getting the google assistant working you might find more help on the Raspberry Pi forums https://www.raspberrypi.org/forums/viewforum.php?f=114
Hi Thanks for info. Have you looked at https://pimylifeup.com/raspberry-pi-google-assistant/? This has been updated 21-Aug-18! It does seem the latest version. Do you think I could add radio_mod.py to the src it creates?
For info I do not have a voice hat – I was just using my RPI3’s audio jack socket.
Yours Fred
Ah it might not matter if you aren’t using the voice hat, I think the google aiy image has the drivers etc set up and working for the voice hat. I’ve no idea about that method, I’ve only used the one I linked to before https://github.com/google/aiyprojects-raspbian/tree/voicekit and I’ve built my mods based on that, hopefully you can get it to work, good luck!
Hi Okay – I will have another go with your link. The pimylifeup seemed to make the client secret etc very complicated and then all the extra google stuff too! Thanks for all the advice. In the end I think this voice software will become easier to handle on RPIs. Best Regards Fred
Are you still looking to maintain this version of radio_mod.py? I am using the latest (Oct 2018) version of AIY-Projects-Python for AssistantPi. As noted in previous comments, to get the script to run I had to change the following:
Add in:
import platform
Replace:
from google.assistant.library import Assistant
with:
from aiy.assistant.libraray import Assistant
With the above changes I can run the script and speak a command e.g. “Radio 2” and I do get Radio 2 audio but with some pulse audio errors (see below)
You said: radio 2
[2018-10-20 12:52:25,313] INFO:root:Radio command received: radio 2
[2018-10-20 12:52:25,314] INFO:root:Playing radio: http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_two.m3u8
[01d23c08] pulse audio output error: PulseAudio server connection failure: Connection refused
[01c7f3b0] pulse audio output error: PulseAudio server connection failure: Connection refused
[6f200e48] httplive stream: HTTP Live Streaming (a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_two.m3u8)
[6f2068b0] ts demux: MPEG-4 descriptor not found for pid 0x22 type 0xf
[6f280220] packetizer_mpeg4audio packetizer: AAC channels: 2 samplerate: 48000
I can say “Radio Off” and the audio output is stopped but again with errors:
You said: radio off
[2018-10-20 12:53:15,398] INFO:root:Radio command received: radio off
[2018-10-20 12:53:15,474] INFO:root:Switching radio off
[68bff660] http access error: cannot connect to as-hls-uk-live.akamaized.net:80
[68bff660] access_mms access error: cannot connect to as-hls-uk-live.akamaized.net:80
[6f200e48] core stream error: no suitable access module for `http://as-hls-uk-live.akamaized.net/pool_7/live/bbc_radio_two/bbc_radio_two.isml/bbc_radio_two-audio=320000-240631242.ts’
[6f200e48] httplive stream error: downloading segment 240631242 from stream 0 failed
With the radio “off” I can start another radio station however I do not seem to be able to “switch” radio stations i.e. switch to “Radio 1” while “Radio 2” is playing. If I attempt this I get the following and radio_mod then becomes unresponsive to ALL commands. Ctrl+C is the only way to stop the output.
[01d4be68] alsa audio output error: cannot open ALSA device “default”: Device or resource busy
[01d4be68] core audio output error: Audio output failed
[01d4be68] core audio output error: The audio device “default” could not be used:
Device or resource busy.
[01d4be68] core audio output error: module not functional
[714a8200] core decoder error: failed to create audio output
[01d4be68] alsa audio output error: cannot open ALSA device “default”: Device or resource busy
[01d4be68] core audio output error: Audio output failed
[01d4be68] core audio output error: The audio device “default” could not be used:
Device or resource busy.
[01d4be68] core audio output error: module not functional
[714a8200] core decoder error: failed to create audio output
You said: radio off
[2018-10-20 12:53:59,503] INFO:root:Radio command received: radio off
[2018-10-20 12:53:59,504] INFO:root:Switching radio off
[71e07e18] http access error: cannot connect to as-hls-uk-live.akamaized.net:80
[71e07e18] access_mms access error: cannot connect to as-hls-uk-live.akamaized.net:80
[714110d8] core stream error: no suitable access module for `http://as-hls-uk-live.akamaized.net/pool_7/live/bbc_radio_two/bbc_radio_two.isml/bbc_radio_two-audio=320000-240631255.ts’
[714110d8] httplive stream error: downloading segment 240631255 from stream 0 failed
You said: radio stop
[2018-10-20 12:54:05,102] INFO:root:Radio command received: radio stop
[2018-10-20 12:54:05,103] ERROR:root:Error finding station stop
[2018-10-20 12:54:05,104] INFO:root:Playing radio: http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8
[01d35228] pulse audio output error: PulseAudio server connection failure: Connection refused
[01c83210] pulse audio output error: PulseAudio server connection failure: Connection refused
[6f350c20] httplive stream: HTTP Live Streaming (a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8)
[6f3816b0] ts demux: MPEG-4 descriptor not found for pid 0x22 type 0xf
[6f352148] packetizer_mpeg4audio packetizer: AAC channels: 2 samplerate: 48000
[01c83210] alsa audio output error: cannot open ALSA device “default”: Device or resource busy
[01c83210] core audio output error: Audio output failed
[01c83210] core audio output error: The audio device “default” could not be used:
Device or resource busy.
[01c83210] core audio output error: module not functional
[6f357ea0] core decoder error: failed to create audio output
[01c83210] alsa audio output error: cannot open ALSA device “default”: Device or resource busy
[01c83210] core audio output error: Audio output failed
[01c83210] core audio output error: The audio device “default” could not be used:
Device or resource busy.
[01c83210] core audio output error: module not functional
[6f357ea0] core decoder error: failed to create audio output
Is there a way to detect that a stream is already playing and prevent going into this error mode if another stream is requested?
I haven’t had any chance to look at this recently. It’s all on github so feel free to fork, make changes and submit pull requests.
I don’t think I ran into this problem as I found the assistant unresponsive while a radio station was playing (it was generating too much noise!) and I had to press the button to stop it. A quick fix that may work is adding a call to radio_off() somewhere at the beginning of the radio function.
Ok thanks. I think you are right – I’ll go back and check the code but it as you say it probably just needs a call to radio_off() adding to the start of every call to play a station. That way it will just “turn off” the radio if it is currently off ( ie nothing will happen) but if it is playing a station it will turn off before attempting to play the next station. This should avoid the radio player crashing when “switching” radio stations.
I am using a Rpi in headless mode connected to external powered speakers with an in built volume control. I found that if I lowered the volume slightly the assistant could hear me and I was able to issue voice commands such as “radio off” or “radio (X)” Not strictly hands free, voice control but I can live with that.
I’ll have a play with the code and maybe submit something via GitHub if I get it to work.
Thanks.
Hi I have tried this idea: https://www.hackster.io/RobAl33/google-aiy-internet-radio-4303a3. It did not work but only one error – and not fatal to the whole program so my GA still works. I have a working GA based on https://www.raspberrypi.org/forums/viewtopic.php?t=204865#p1270641. This uses aiy_assistant_with_local_commands_demo.py that is symlinked to main.py so I thought I could re-write this local_commands file and add the additions from RobAl33 (along with VLC etc) – rather like creating a radio_mods.py! It seemed to work better but not all the way. Any thoughts on this approach? Thanks!
Yes that sounds like it should work.
Hi Thanks – I did manage to get it to work by modifying the local commands demo file with your radio_mod.py code. The big difference was that the Robert Allen code used another command to get the station streams – your get_station command plus a few other changes seemed to make it work. I am not a coder so what was the critical change I do not know for sure.
accutane ipledge accutane ipledge
buy provigil goodrx modafinil
https://bactrimsulfamethoxazole.com/ trimethoprim sulfamethoxazole
goodrx modafinil provigil 100mg
prednisolone price us https://deltasoneprednisone.com/
prednisone side effects https://prednisolonesodiumphosphat.com/
bactrim dosage side effects for sulfamethoxazole trimethoprim
provigil reviews buy modafinil reddit
modafinil generic buy modafinil
bactrim for sinus infection sulfamethoxazole and alcohol
trimethoprim sulfamethoxazole dosage https://bactrimhoprim.com/
isotretinoin isotretinoine
provigil 200 mg modafinil warnings
bactrim and alcohol trimoxazole side effects
isotretinoine roaccutane side effects
prednisolone acetate ophthalmic suspension how much is a prednisone prescription
buy modalert online modafinil half life
accutane ipledge buy isotretinoine
modafinil side effects provigil drug
bactrim ds bactrim
bactrim ds https://bactrimtrimoxazole.com/
prednisone side effects in dogs side effects of prednisolone
trimethoprim cream https://bactrimtrimoxazole.com/
accutane for acne accutune
prednisone vs prednisolone prednisone warnings
modafinil and alcohol modalert 200
sulfamethoxazole tmp ds tablet trimethoprim side effects in elderly
how does accutane work https://sotretisotretinoin.com/
buy prednisolone tablets prednisolone
what is accutane https://genisotretinoin.com/
provigil half life modafinil 100mg
https://bactrimhoprim.com/ cipro
side effects for prednisolone prednisone for sale
https://prednisoloneprednisolone.com/ prednisolone eye drops
accutane coupon what is accutane
provigil for depression how long does modafinil last
modafinil reviews https://modafinilltop.com/
https://bactrimtrimoxazole.com/ bactrim antibiotic
side effects of prednisolone what does prednisone do
accutane ipledge https://isotroinisotretinoin.com/
modafinil reddit modalert 200 reddit
buy isotretinoine roaccutane
provigil prescription modalert vs modvigil
Trimethoprim bnf sulfamethoxazole tmp 800 160
what is modafinil used for modafinil reddit
https://tretivaisotretinoin.com/ accutane medication