Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Controll mopidy without screen using GPIO and TTS

Project description

Latest PyPI version Number of PyPI downloads Travis CI build status Test coverage

Control mopidy without screen using GPIO and TTS

For example if you play “Rather Be - Clean Bandit” you will hear:

TTS (Text To Speech) is used from google translate (It is not documented but it works).

The idea is to develop with GPIO buttons something similar to 3rd generation Ipod shuffle control


  • Led to see if it is playing
  • Play/Pause
  • Next/Previous track
  • Select playlist
  • Hear the song name (Text To Speech)
  • Exit mopidy
  • Shutdown
  • Restart
  • Check IP


To use this extension you need an internet conection for the tts.

Install by running:

pip install Mopidy-TtsGpio

To access the GPIO pins in the raspberry pi you have to run mopidy with sudo:

sudo mopidy


Before starting Mopidy, you must add configuration for Mopidy-TtsGpio to your Mopidy configuration file:

debug_gpio_simulate = false # Set true to emulate GPIO buttons with on screen buttons
pin_button_main = 17
pin_button_next = 22
pin_button_previous = 23
pin_button_vol_up = 24
pin_button_vol_down = 25
pin_play_led = 18

You can set the pins you would like to use. The numbers are in BCM mode. You can check here to see the numbers for your board. The buttons must be connected to GROUND.


[pin 17] - [Button] - [Ground]


  • main: play/pause. In menu select item
  • main longpress: enter/exit menu
  • vol_up longpress: repeat last sentence
  • vol_down longpress: set the volume 0
  • next: in menu navigate to next item
  • previous: in menu navigate to next item



  • GPIO will be disabled if not enough permission


  • First working version

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Mopidy-TtsGpio, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size Mopidy-TtsGpio-1.0.2.tar.gz (12.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page