Quick guide to getting Kodi working with TTS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is something I've been meaning to put on the list for a while, but only just now got around to it having to reinstall Kodi on a new laptop, and I figured I'd share. Kodi does, in fact, work with the screenreader addon., with a few caveats:

1. I've taken this from the Kodi screenreader topic on the forum, all credits go to vbprofi for writing the original guide

2. I've only tested this on a 64 bit distro
3.I'm using the flatpak version of Kodi for this since it's distro agnostic, but you can follow the instructions. I'll highlight the Flatpak specific things as and when we get to them

Things you'll need:

1.Kodi installed either by flatpak or your distro's packages. I installed it via Flatpak because on NixOS, the usual methods do not result in being able to use addons, and I get a more up to date Kodi via flatpak

2. A way to download the files in question

3. The knowledge of where the Kodi directory is. It's either in .kodi or within the flatpak directory. I'll put both paths in when we get to that

Ready? Let's go

1. Install Kodi, either by flatpak or your distor's package manager

2. Get the folder ready

Go to the pvagner/service.xbmc.tts Python 3 branch
https://github.com/pvagner/service.xbmc.tts/tree/2to3

Click on Code, Download ZIP, and download the file named service.xbmc.tts-2to3.zip

Go to the pvagner/backends Python 3 branch
https://github.com/pvagner/backends/tree/2to3

Click on Code, Download ZIP, and download the file named backends-2to3.zip


Extract both folders, and put everything from the 2to3 folder into the service.xbmc.tts/lib/backends folder

3M. Move the folder into the right location

It is either:

kodi (if installing via a package manager

Or, if using flatpak

~/.var/app/tv.kodi.Kodi/data/addons/

So eithr way you end up with the service.xbmc.tts folder inside the addons directory

4. copy the addons/service.xbmc.tts/resources/settings.xml file to userdata/addon_data/service.xbmc.tts/settings.xml

So for example, the path should look like

~/.kodi/userdata/addon_data/service.xbmc.tts/settings.xml
Or

~/.var/app/tv.kodi.Kodi/data/userdata/addon_data/service.xbmc.tts/settings.xml

5. Create the keymap


Go to your Kodi folder, and create the file userdata/keymaps/service.xbmc.tts.keyboard.xml and insert the following:

<keymap>
  <global>
    <keyboard>
      <f1>NotifyAll(service.xbmc.tts,REPEAT)</f1>
      <f2>NotifyAll(service.xbmc.tts,EXTRA)</f2>
      <f3>NotifyAll(service.xbmc.tts,ITEM_EXTRA)</f3>
      <f4>NotifyAll(service.xbmc.tts,STOP)</f4>
      <f6>Addon.OpenSettings(service.xbmc.tts)</f6>
      <f12>RunScript(special://home/addons/service.xbmc.tts/enabler.py)</f12>
      <numpadplus mod="ctrl">NotifyAll(service.xbmc.tts,VOL_UP)</numpadplus>
      <numpadminus mod="ctrl">NotifyAll(service.xbmc.tts,VOL_DOWN)</numpadminus>
      <plus mod="ctrl">NotifyAll(service.xbmc.tts,VOL_UP)</plus>
      <minus mod="ctrl">NotifyAll(service.xbmc.tts,VOL_DOWN)</minus>
      <equals mod="ctrl">NotifyAll(service.xbmc.tts,VOL_UP)</equals>
    </keyboard>
  </global>
</keymap>

6.

If you installed to .kodi with your package manager and have been following along with the keymap and addon directories in .kodi, then, hitting F12 should have Kodi beep and start talking

If using the flatpak you need to override permissions and enable it to speak to the speech-dispatcher socket

flatpak override --user --filesystem=/run/user/1000/speech-dispatcher

After that, pressing F12 should have Kodi start talking.upKo

To unsubscribe from this group and stop receiving emails from it, send an email to blinux-list+unsubscribe@xxxxxxxxxx.

[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]