Skip to content

Instantly share code, notes, and snippets.

@coenraadhuman
Last active April 29, 2020 03:31
Show Gist options
  • Save coenraadhuman/ff10adccf1d7c43d8d0298dbd1c5916f to your computer and use it in GitHub Desktop.
Save coenraadhuman/ff10adccf1d7c43d8d0298dbd1c5916f to your computer and use it in GitHub Desktop.
Install Tizonia on RPi with working Google Music
#! /bin/bash
echo "Adding required repositories."
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/buster.list
curl 'https://bintray.com/user/downloadSubjectPublicKey?username=tizonia' | sudo apt-key add -
echo deb https://dl.bintray.com/tizonia/raspbian buster main | sudo tee -a /etc/apt/sources.list
echo "Updating repositories."
sudo apt update
echo "Installing Tizonia and dependencies."
sudo apt install libspotify12
sudo apt install libtizspotifysrc0
sudo apt install tizonia-all
sudo apt install python3-pip
pip3 install gmusicapi
pip3 install fuzzywuzzy
pip3 install python-Levenshtein
echo "CHANGE LOGIN CREDENTIALS (Use Google App Password) : "
echo "nano $HOME/.config/tizonia/tizonia.conf"
echo ""
echo "# Google Play Music configuration"
echo "# -------------------------------------------------------------------------"
echo "# To avoid passing this information on the command line, uncomment and"
echo "# configure here."
echo "#"
echo "gmusic.user = YOUR_GMAIL_EMAIL"
echo "gmusic.password = YOUR_APP_PASSWORD"
echo "gmusic.device_id = 1234567890abcdef"
echo "# gmusic.buffer_seconds = size of the audio buffer (in seconds) to use while"
echo "# downloading streams. Default: 720. Increase in"
echo "# case of cuts."
echo ""
echo "*Please take note that on first login the gmusic.device_id is given in the error message.*"
echo ""
echo "CHANGE AUDIO RENDERER FOR RPI : "
echo "nano $HOME/.config/tizonia/tizonia.conf"
echo ""
echo "# Tizonia player section"
echo "# The default audio renderer used by the tizonia player"
echo "# -------------------------------------------------------------------------"
echo "# Valid values are:"
echo "# - OMX.Aratelia.audio_renderer.pulseaudio.pcm"
echo "# - OMX.Aratelia.audio_renderer.alsa.pcm"
echo "#default-audio-renderer = OMX.Aratelia.audio_renderer.pulseaudio.pcm"
echo "default-audio-renderer = OMX.Aratelia.audio_renderer.alsa.pcm"
@coenraadhuman
Copy link
Author

I suggest you force it to output just to the 3.5 audio jack:

https://www.raspberrypi.org/documentation/configuration/audio-config.md

Then this is the section for the alsa or pulseaudio (from what I just read this needs to be alsa):

echo "CHANGE AUDIO RENDERER FOR RPI : "
echo "nano $HOME/.config/tizonia/tizonia.conf"
echo ""
echo "# Tizonia player section"
echo "# The default audio renderer used by the tizonia player"
echo "# -------------------------------------------------------------------------"
echo "# Valid values are:"
echo "# - OMX.Aratelia.audio_renderer.pulseaudio.pcm"
echo "# - OMX.Aratelia.audio_renderer.alsa.pcm"
echo "#default-audio-renderer = OMX.Aratelia.audio_renderer.pulseaudio.pcm"
echo "default-audio-renderer = OMX.Aratelia.audio_renderer.alsa.pcm"

Some extra resources:

@evilblade666
Copy link

I suggest you force it to output just to the 3.5 audio jack:

I did. Years ago in fact :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment