Are there any text-to-speech ai tools available using elixir?

Background

As I often do, I read books to learn and improve myself. I also enjoy teaching and helping others when I can, so this is something I try to do regularly.

However, as time goes by (and so do the years) I have slowly come to realize it is becoming increasingly harder not only to maintain focus when reading/studying a new topic, I also forget things faster.

It is not an uncommon occurrence to re-read an “old” article or book, and to become surprised with things I had learned before. I have come to the inevitable conclusion this will only happen more frequently with time.

Although I do enjoy reading and learning, if I keep reading and the learning the same things over and over again, I will not evolve. Eventually I will gradually lose my ability to help others in topics of relevance, something I cannot live with.

So I decided to take a new approach. Re-learning old concepts is now something I have accepted, but I do get to choose how I re-learn them. I have decided to make a series of instructional videos (10-15) minutes long, freely available on youtube, free lectures for all to see.

Not only does this achieve my end goal of helping others more efficiently, it is also a quick and convenient way of re-learning things for myself. It also allows me to add my opinions, experiences and additional context, which is something I value immensely.

Problem

I have several scripts done, and I have power-point like presentations done as well for them. The issue now is that in order to make videos, I need to record sound. I have it from several sources, that my voice is … not ideal. Not only that, should my initiative succeed and my channel gather traction, I will be barred from certain jobs in the country I live because it is a common occurrence for managers and bosses to “avoid hiring known people”, for company political reasons.

In order to protect myself and to create videos that are somewhat acceptable I have decided to use text-to-speech audio generation.

However, all the tools I have found so far are in Python. Many of them are abandoned and even when they are not, there are always dependency issues with the likes of PyTorch and Tensor and so on.

I have not yet seen a Python project where things just work because there is always a dependency issue somewhere. Even the creators of some of those tools acknowledge this. To make things even more complex, some of these tools require specifically NVIDIA GPUs, which I don’t have.

Question

So I was wondering if there are out there any Elixir tts generation tools that one could use. Because Elixir uses BEAM, I assume requiring an NVIDIA GPU is not a necessity. Furthermore, I also assume I wouldn’t have to constantly fight with Python dependencies.

Are there any tools in Elixir that follow this requirements? Or is it too early in the Elixir ecosystem for such tools to exist yet?

Bumblebee supports speech to text (whisper), but unfortunately not text to speech (at least not yet). TTS models have been getting pretty good and pretty small so it would be great to see that.

BEAM is too slow to run these sorts of models natively. Like Python, Nx offloads the actual computation to tightly optimized native SIMD code or GPU kernels which do the actual work in parallel. Nx has a couple of backends so you can check and see if they support your hardware.

1 Like

This whole time I have been trying to run these models locally, which was hard not only because I don’t have an NVIDIA GPU, but because my GPU is fairly weak.

To bypass this I tried SaaS for this, but they all have severe limitations and it ended up affecting my workflow tremendously, to the point where continuing was not even viable.

But after trying you link to kokoro-tts hosted in Google Colab, I have to say my issue is solved. Since I only use this every few weeks (as studying as writing the scripts takes time), it turns out the free tier is more than enough for my needs!

Your post solved my issue! The Elixir eco system may not be mature enough, but I have Google Colab and their GPUs are tremendously more powerful than anything I have!

Thanks, this solved the issue!