Skip to content
Kodi cli controls and google assistant integration
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Voice Control for Kodi and beyond


Before getting started with this repo you first need to have a working Kodi installation on you local area network. I have only tested running this repo on a separate raspberry pi as the one running Kodi but if you can get the mic and audio out configure properly on your raspberry pi OS (eg OSMC) there is no real limitation to have both in one device.

Install Google Assistant Demo

for current version of voice control to work, you need to:

  1. compile python 3.6 from source for raspberry pi
sudo apt update
sudo apt install build-essential -y
tar xzvf Python-3.6.1.tgz
cd Python-3.6.1/
sudo make install
  • takes about 15 minutes on RaspberryPi3
  1. have google-assistant-demo installed

if you want to set audio out to analog: (aux out) amixer cset numid=3 1

  1. now you should have google assistant setup and running. startup your assistant and talk to it. You should see your voice converted into text (from the logs on the raspberry pi). If you attached a speaker you should also be able to hear back answers to yours queries. This step should be fully functional before you can move to the next.

Install Kodi Extras

  • clone the repo to a direcotry: git clone
  • setup the environment variables.
  • this repo uses pipenv to handle the dependencies for the project so make sure you have it and know how to use it.
  • install requirements using pipenv install
  • enter the virtual env with pipenv shell to run the scripts. you can also lookup the env python executable address using pipenv --venv, for example if you want to use it as a cronjob

Environment Variables

  • YOUTUBE_API: google how to get youtube api
  • GOOGLE_ASSISTANT_LOCATION ( for the voice control to work )
  • KODI_ENDPOINT_ADDRESS eg. http://192.x.y.z:8080
  • KODI_USERNAME:if you have https password setup on your kodi you have to set your credentials using this and the next env variable

Running the voice controller

If everything is setup succesfully, from the kodi-extra directory, running python should startup the the program. Now talk to your assistant and ask it to play any video from youtube and also control your media playback.

You can’t perform that action at this time.