Podcast Player for the Raspberry Pi AIY Project

I’ve added a podcast player with pause, resume and play a random episode to my MagPi Raspberry Pi Google AIY Projects box.

The code for the podcast player is here: https://github.com/ktinkerer/aiyprojects-raspbian/tree/podcast_player

You will need to copy actions.py, main.py and vlc.py from this branch and put them in your ~voice-recognizer-raspi/src/ folder.

This needs vlc to be installed.

sudo apt-get update
sudo apt-get install vlc

You also need to install the python package feedparser.

sudo pip install feedparser

Check vlc is working using:

cvlc http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8

This should start playing a radio stream. Stop it with ctrl-c

Add your own podcasts in the list of urls, I’ve left some of my podcasts as an example but you will probably want to delete these. You need the podcast rss feed for this to work.

Restart the voice recognition service:

sudo systemctl restart voice-recognizer.service

Play podcasts with the command “podcast “. By default it will play the latest episode. To play a random episode say “random podcast . Pause and resume podcasts with “podcast pause” and “podcast resume”.

Check the logs for errors using

sudo journalctl -u voice-recognizer -f

You may need to tweak your podcast names depending on what the voice recogniser registers.

If you want to use all the mods I’ve made they are on this branch: https://github.com/ktinkerer/aiyprojects-raspbian/tree/my_mods/src

10 Comments

Add a Comment

Your email address will not be published. Required fields are marked *