The One Button Audiobook Player

This little Raspberry Pi based project is a gift for my wife’s grandmother for her 90th birthday. Being visually impaired, she is hard to entertain but loves to listen to audiobooks. The problem is, that she isn’t able to handle a ghetto blaster or MP3 player.

The solution to this problem was – tadaaaah – a one button audiobook player :)

It basically consists of:

  • 1 Raspberry Pi
  • 1 ModMyPi enclosure
  • 1 button
  • 2 resistors (330 Ohm, 10 Kilo-Ohm)
  • 1 blue LED
  • 1 (slow) 8GB SD-Card
  • some wire
  • a pair of speakers

The following software has been used:

The features are the following:

  • always on: When you power on the raspberry, it will boot up and start the python script with the audio book in pause
  • one button usage: The button pauses and unpauses the audio book or goes back one track when you press the button longer than 4 seconds
  • remembers position: It will always remember the last played position
  • only one audiobook: There will always be only one audio book on the Raspberry
  • easy audio book deployment: When you plug in a USB thumb drive with a special name/label, the Raspberry will stop playing, mount the thumb drive, deletes the old audio book, copies the new one, rebuilds the playlist and – after unplugging the thumb drive – starts the new audiobook in pause mode
  • multi format: Since it uses mpd, the player supports  Ogg Vorbis, FLAC, OggFLAC, MP2, MP3, MP4/AAC, MOD, Musepack and wave

Some pics and a video:


(The audiobook used in this video is a free version of Cory Doctorows “Little Brother” from Fabian Neidhardt)

If you like to build your own one button audio book player, here are the super simple schematics:

And last but not least – the python script. The code might be crappy, please comment if you have improvements (especially regarding loadMusic). You can find it on github:

Update (2013-11-26)

Here’s what Russel wrote in a comment to this post:

“I just completed building this and have some addendum notes adding more details:

Install the following packages:
sudo apt-get install mpd
sudo apt-get install mpc
sudo apt-get install python-mpd
sudo apt-get install python-pyudev

(below assumes using defaults for /etc/mpd.conf)
sudo mkdir -p /music/usb
sudo ln -s /var/lib/mpd /music/mpd
sudo ln -s /var/lib/mpd/music /music/mp3

Copy the script to /home/pi
nano /home/pi/
Change these in the script or flip the connections in wiring diagram.
LED = 24

Rename a USB stick to “1GB”
Copy 1 MP3 onto the stick
Insert the stick into pi

sudo mount /dev/sda1 /music/usb
sudo /etc/init.d/mpd stop
sudo rm /music/mp3/*
sudo cp /music/usb/* /music/mp3/
sudo umount /music/usb
Remove the USB stick

sudo rm /music/mpd/tag_cache
sudo /etc/init.d/mpd start
mpc clear
mpc ls
mpc ls | mpc add
sudo /etc/init.d/mpd restart
mpc play

Plug in earphones
You should hear audio
Next try the python script:
sudo python /home/pi/
Insert USB stick
the LED should flash and the USB file copy to /music/mp3/
the LED should flash again. Remove the Stick and LED flashes again.
Press button to start playing
Press button again to stop
Press & hold button to rewind to beginning.

sudo crontab -e
Add following line run at startup
@reboot python /home/pi/ &
sudo reboot
Then retest again to be sure all is well.”







130 thoughts on “The One Button Audiobook Player

  1. Hi Ronaldo,

    To setup your AudioBook player you need to connect a keyboard.

    The final part of the installation is the “crontab” thing. Then each time you’ll boot your Raspberry pi, the audiobook will be launched automatically. So no need a keyboard after :)


  2. Pingback: Raspberry Pi One Touch Audiobook *Updated* | DL-UAT

  3. Completely new to this kind of stuff and this is perfect for my nearly blind grandmother. Cant find any easy step by step tutorial tho. Can anyone help? I have the raspberry pi B+, wires, led, button and resistors. The rest is totally greek to me. Hope for some help here.

  4. Pingback: 25 unglaubliche Raspberry-Pi-Projekte | t3n

  5. Great work !
    Thank you very much.

    I have a problem with long books. If I have a lot of tracks, i cant hear them after copy them to the raspberry pi. Do you have any idea why?

  6. Hi John Carley,

    I don’t know If you are still looking for one of these. But if you do, contact me : adrihebert @ gmail . com

    Have a good one,


  7. Father in law is recovering from stroke. Lost control of right hand and limited left hand dexterity. Found these posts looking for a way for him to live a little but I don’t think I’m tech enough to pull this off. Anyone willing to build and sell one ? Email me. Thx

  8. Hi Dominikus !

    Yes I have an idea ! I had the same problem.
    The key is to make a single file from all your chapters files.
    It’s not complicated on Windows. It’s just a few lines script.
    Send me an email at adrihebert @
    I will send you my little script :)


    PS: I some other people have this issue, feel free to ask me by email too

  9. Hi Kyle !

    Your email doesn’t appear ! Comment it if you want some help, or just email me (you will find my address in older comments).


  10. Pingback: Etwas für den Sonntag : Geniale Projekte für Raspberry Pi und Pi 2 ! | DER KLUGSCHEISSER

  11. Pingback: Simple Audiobook Player For Seniors And Blind People | Scott P Daugherty

  12. Hi,

    nice tutorial! I tried it the way from russel. But when I do mpc play, I get an “Error: problems opening audio device”.

    What could that mean?

    Thanks for help!

  13. I love this idea! We forget that for older people, tech can actually make their lives more inconvenient. Great idea for “back porting” tech for the elderly.

  14. Fantastic, worked first time. I do however wish I had read all the comments about the diagram GPIO label switch. That had me confused for a while.

    One thing I had misunderstood was the restart from where you left off function. I now see that it only remembers for as long as it stays powered.

    Many thanks

  15. I have a great Aunt (96 years old!) who loves those old radio shows (Fibber McGee, etc). I am thinking this type of machine would be neat if she could push a button and have one track (show) play, and then automatically stop. Then, the next time she would press the button, another track (show) would play, and then automatically stop, and so on. Do you all think this would work? Thanks so much, in advance! — David

  16. This thing is great. I want to pull my hair out when I try to teach my grandmother how to listen to music on her smartphone.
    I got this working but would like to add an option for fast forward. Does anyone know how to add a command so pressing it twice would make it skip to the next track?

  17. Hi,
    I’ve installed this on a RPi B with rasbian jessie.
    Whenever I press the button and the python script is running longer than a minute the script stopped with an error:
    Traceback (most recent call last):
    File “/home/pi/”, line 130, in
    File “/home/pi/”, line 112, in main
    if client.status()["state"] == “stop”:
    File “/usr/lib/python2.7/dist-packages/”, line 167, in
    return lambda *args: wrapper(command, args)
    File “/usr/lib/python2.7/dist-packages/”, line 213, in _execute
    return retval()
    File “/usr/lib/python2.7/dist-packages/”, line 329, in _fetch_object
    objs = list(self._read_objects())
    File “/usr/lib/python2.7/dist-packages/”, line 274, in _read_objects
    for key, value in self._read_pairs():
    File “/usr/lib/python2.7/dist-packages/”, line 253, in _read_pairs
    pair = self._read_pair(separator)
    File “/usr/lib/python2.7/dist-packages/”, line 244, in _read_pair
    line = self._read_line()
    File “/usr/lib/python2.7/dist-packages/”, line 229, in _read_line
    raise ConnectionError(“Connection lost while reading line”)
    mpd.ConnectionError: Connection lost while reading line

    Do I need to somehow update the script to work with the actual release of mrd/mrc?


  18. Pingback: Raspberry Pi One-Button Audiobook Player – Raspberry Pi News

  19. Hi if anyone needs a talking book player with guiding voice and support for the DAISY 2.02-standard and the DAISY Online Delivery protocol, have a look at our open source solution at Images for Raspberry Pi model B and B+ available for download at We will soon release support for RP 2 and Daisy 3.

    Books available at many national libraries and organisations for visually impaired and at Over 2 million DAISY-titles are produced worldwide.

    We also provide an open source DAISY Online web service solution where users and publications can be added and streamed to the RP.

  20. Gunter P, I had the same problem. It’s caused by mpd, it stops after 60 seconds of inactivity. Sollution is to edit mdp config (sudo nano /etc/mpd.conf) and add line (connection_timeout “60″). Change 60 seconds to to 2, 10, 24 hrs. You could also add crontab entry (0 * * * * sudo /etc/init.d/mpd restart) to restart mdp every hour. Didn’t test it a lot, but it works for about an hour now and nothing bad happens. I hope it will help.

  21. Good evening. I did not see this posted (but may have missed it)… how do you address power? Must it remain plugged in to the wall or does the user need to change the battery?

    Second, how about volume control? My users will probably have a hearing problem as well as visual issues.

    I see this as a solution to our shut-in ministry for sermons. I’ll need to make sermons into “chapters” but otherwise it will work great. Thank you for posting this. ~DC

  22. Does anyone have the entire image for someone with no coding can download and build. I have little programming knowledge and I error when it can’t find the file; sudo rm /music/mp3/*.
    I would love to build this for my mother.
    Any help would be appreciated

  23. Pingback: Plus de 60 idées pour votre Raspberry Pi | larajtekno

  24. I came across this while looking for books on cassette for my mom. She has always read and at age 90 has Macular . This is a wonderful idea, i would love Many are so expensive and complicated. Mom uses touch and position for buttons on player, but many to big to sit on patio with- and she is on a walker now. but still going strong. My mom could not keep up with anything smaller than a cassette. This is a remarkable gift of such love and compassion. The world needs more people who think with theri heart and not their pocketbook. Great job

  25. Pingback: BLOG | Top 20 Awesome Projects For Raspberry Pi

  26. Pingback: Arduino Project 5: Digital audio player -Use Arduino for Projects

  27. im getting errors at the usb stage… any chance you done a video tutorial building this?