Kodi Community Forum
service.kodi.tts (Text To Speech) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: service.kodi.tts (Text To Speech) (/showthread.php?tid=357602)

Pages: 1 2


service.kodi.tts (Text To Speech) - fbacher - 2020-10-09

I am in the process of getting the old service.xbmc.tts service to work and modernizing it as well. I still have a long way to go. However, I do have limited functionality for Linux. i am sure that I can get windows working as well.

It would be great if I had one or more people willing to try it out and give feedback.

It only works on Kodi 19 (in alpha 2).
I have focused on Linux, espeak and Responsive Voice. Responsive Voice is a web-based commercial product, but you can get a free account and API key that allows you to voice ~ one million characters a month. It is pretty good.

I have added caching so that it doesn't have to regenerate what has already been voiced.
You can adjust the volume of the speech on playback (so you don't have to regenerate it).

I haven't spent much time with windows, but so far it fails miserably with their api (sapi, I think).
I am reworking the settings and the way they are set so that they are voiced and take effect as soon as you make the change.

I have NOT updated the code which scrapes the content from dialogs, etc. to voice. The old stuff works, but i am sure there are changes that need addressing.

Please contact me if you have interest. A direct email, or message on this thread will get to me. The code is at: https://github.com/fbacher/service.kodi.tts. Lately I have been focused on another plugin (randomtrailers) that I want to get ready for release. But I do want to get back on this project soon.


RE: service.kodi.tts (Text To Speech) - jhall - 2022-11-26

Is this code currently compatible with current Kodi?


RE: service.kodi.tts (Text To Speech) - vbprofi - 2023-02-21

Hello,
does it now also run in Windows with Jaws, NVDA or SAPI?


RE: service.kodi.tts (Text To Speech) - fbacher - 2023-02-21

Sadly, No,service.kodi.tts does not work with Kodi since Kodi 19.  I have been working on a part of Kodi which has been blocking another addon. I want to get back to tts soon. I have a private copy that works to a limited degree which I need to make suitable for general use. It will not be full-featured for a few iterations.

It is designed to work with Windows, and I think Jaws. I have not done much with that code but it won't be running from the start.

I would help to know priorities.

What I have mostly done is get it limping on two voices on Linux. One of the voices is a Linux built-in older-style speech synthesis. The other one uses an api which gets high quality voicing from a remote provider. You can get a free license to handle 1 million/chars a month. I plan to add several other similar services, in addition to the platform built-in ones.

The other thing that I have worked quite a bit on is redoing the configuration. The previous version did not dynamically change its voicing as you changed the settings. This is tricky to do but I made good progress. I won't wait to get this perfect before an 'alpha' release. You can always configure the horrible edit the raw settings.xml if you have to.

So, I expect to get this going in early summer.


RE: service.kodi.tts (Text To Speech) - leonardder - 2023-03-21

I'm a blind Kodi user myself and am happy to help where I could. I'm mostly interested in Linux support.


RE: service.kodi.tts (Text To Speech) - fbacher - 2023-03-23

Great! I'm trying to get this other stuff behind me. I (and my low-vision wife) am anxious to get back to tts. My first priority is to stabilize what I have and ship it. Are you a programmer? Have expertise with Linux/Windows TTS? Good at reporting problems? Other?


RE: service.kodi.tts (Text To Speech) - Amethyst - 2023-04-05

Hi there. I am an experienced blind Kodi user. I would love to give feedback for this if you end up developing this further. NVDA support was working for Kodi 16 I believe. NVDA being a screen reader on windows. The addon had a library that would interfase with it, but when Kodi version 17.6 came around it broke it. I am now using Kodi 19.4, as the tts solution I use does not seem to work on v20.


RE: service.kodi.tts (Text To Speech) - fbacher - 2023-04-07

Thanks for the note. I am glad to learn about NVDA. I work almost exclusively with Linux, but I'll modernize my Windows 2000 system soon so that I can work on that as well.

I'm surprised that it worked with Kodi 19.4. I had to do a lot of work to get that going. My memory is that it had a lot of trouble with moving to Python 3, but perhaps it was dependent addons that were the biggest trouble and they got resolved? I have my private copy (with lots of bailing wire) running on 20.1 on Linux. I have made a ton of changes but it needs a ton more before it is a product. My plan is to get 2-3 voicing engines working on Linux and Windows and then release it is a Beta and continue improving it from there. I added support for Responsive Voice, which is a service that provides TTS for websites. They have a free one million character translation per month subscription that I use. It works fairly well since I cache all of the text and Kodi, even with a good sized library, doesn't have that many different phrases to translate. I also want to be able to cache all generated speech to try to reduce the delay between an action and the speech. I have started redoing the UI for configuring TTS so that you can here the changes to the config as you make them.

I haven't yet been able to dive back into this, but I very much want to soon.

What audio engines were you using with TTS and what would you prefer to use?
Anything else that you think that I should look into? I'm particularly interested in any high quality free or almost free TTS software that the community uses.

Frank


RE: service.kodi.tts (Text To Speech) - Amethyst - 2023-04-08

Me being on windows there is the Microsoft speech api, or sapi. Espeak is also an option, it's free and on linux as well. I know a lot of blind people use it as their main voice.
If you end up fixing NVDA on windows it will open up the other voices as well, because NVDA will have less delay than the rest, as it's not speaking via Kodi at all. This also means that any user configuration done in NVDA works in Kodi as well.


RE: service.kodi.tts (Text To Speech) - Amethyst - 2023-04-08

As fpr features I would want to see: Subtitle reading. I know that will probably be difficult, but it would make watching content a lot easier.


RE: service.kodi.tts (Text To Speech) - cyrmax - 2024-02-03

Hello!
I have tried the old addon for Kodi 18 but it was laggy on Windows and tried to read the interface with a very slow and unresponsive Windows Sapi voice.
Now I didn't find any up to date information about the addon compatibility in a readme on github and so tried to install it on Kodi 20 on Windows 10.
It failed.
And as I read this topic I understand that Kodi 20 will not work neither on Windows nor on Linux and other platforms.
But okay, with Kodi 19 we can try it on Linux.
But on Windows I have my NVDA with OCR which helps me in enabling things in GUI without speech. But how I can install and enable this addon on Linux where I have Orca screenreader but have no OCR support?
This is going to be a big problem for everyone who have no sighted people nearby.


RE: service.kodi.tts (Text To Speech) - fbacher - 2024-02-06

I just started working with the tts addon for Kodi on Windows. I have been working on it for quite some time on Linux.

One reason Kodi 20 TTS does not work with Windows SAPI is that the private Python 3.8 that comes with Kodi does not include several python modules that SAPI requires (win32 and several others). I have been unsuccessful at creating a working patched version of Kodi's private copy. It may be that I would have to build the python and addons, or, more likely, I am doing it wrong since I know very little about this area.

I'm creating a hack for my version of TTS that will enable SAPI to work by using another python installation to run the SAPI code (very ugly and slower). I will also write a request to get the needed dependencies added into Kodi's python.


RE: service.kodi.tts (Text To Speech) - fbacher - 2024-02-06

I'll look into voicing subtitles.

There are a number of newer controls that TTS does not support. At least several look like they need changes to Kodi to implement. For example, there is a type of selection list that does not provide a means to get the label for the list. You can hear the items to select, just not what the heck you are selecting it for.


RE: service.kodi.tts (Text To Speech) - fbacher - 2024-02-09

I checked the old repositories and could not find the service.xbmc.tts addon going back to Leia release (18). Someone just posted a link to a script which will install it on Windows for Kodi 20.

The last development made by the original author was 7 years ago.

I'm spending quite a bit of time with it and have it working reasonably well on Windows 11 (Why on earth does Kodi ship with python 11 (or 12) on Linux but with python 8 on Windows? A lot has changed over that time).

Anyway, I have SAPI and espeak working with Kodi on Windows. I would have more, except for the Python mess. It is NOT ready for the public yet. On Linux you can choose to get voice generated from google, as well as from several experimental high-quality TTS generators running locally, including larynx: https://larynx-tts.wmcloud.org/  and https://pypi.org/project/larynx/ It is a bit over two years old, but still very good. Of course, I'm not sure if the blind community will like it once it is sped up.

I will continue focus on getting several voice engines working well on Windows & Linux. Also must get configuration cleaned up. I'll worry about the Mac later.


RE: service.kodi.tts (Text To Speech) - fbacher - 2024-03-28

I was able to get my unreleased TTS addon to work using native Windows TTS via SAPI. I had to make a private build of python 3.8 and Kodi20 and several python modules (comtypes, pywin32, pypiwin32). I notice that Windows TTS is a bit sluggish. I assume that is because it takes some time to generate the speech. It is particularly noticeable for longer texts, such as a movie's description. I do have the ability to cache the speech produced so that it is much faster on subsequent uses, but I have not set this of for SAPI.

I posted a note about these problems on a developer forum to try to get Kodi build changed so that a private build will not be necessary. The current behavior may be intentional to prevent/discourage addons from installing binary images (.dlls).

I am now focusing on stablzing, cleaning up the addon so that espeak, gtts and piper work and configure cleanly on Linux and Windows 11. I expect the configuration will be the most difficult to clean up. I have been using espeak, gtts, piper and others for quite a while now.