My personal journey to text-to-speech accessibility bot

Photo by Wei-Cheng Wu on Unsplash

So what is this project?

I’ll cut to the chase. It is pretty simple. It’s just text-to-speech framework.

Build stuff

Working on this project, I did manage to run into various issues. Actually, one of the most fun parts of this project was to try to work around those problems.

Text to speech software

First of all, I did need to find a text-to-speech (TTS for short) software that would manage to synthesize the Lithuanian language. This wasn’t a challenge in itself. I’ve found native software that already does TTS called ’Liepa’. It’s built locally, and it’s free to use. It sounds too perfect, right? It is. It runs only on windows. And it might be hard to use it in a Linux server environment.

’Liepa’ over ’Wine’

Still, after tinkering around a bit, I did manage to run it using Wine. It does not work perfectly, but nothing that I cannot address using a bit of coding. Here are a couple of challenges that needed tinkering.

  • Text cannot be longer than 500 symbols or so
  • Whole mechanism uses a file system
  • Running external processes using ’Wine’ leaves zombie processes

Making it useful

Now that I have a mechanism that can convert text to audio files, we need to convert something useful. One quick thought that comes to mind, almost all news services provide a RSS service.

  • Fetch RSS
  • Store it into the database
  • Schedule a TTS service to synthesize the text
  • Fetch results from TTS
  • Provide an API or Web that would display the news that could be played over audio player

Putting everything together

To put everything together, I have 3 parts of the whole mechanism in place.

  • RSS service — responsible for gathering info and storing it (text and converted audio files)
  • TTS service — responsible for launching ’Docker’, takes text, converts it into an audio file
  • Messaging service — connects both services

Potential (?)

Even though I did not create anything unique, this is a huge potential in my eyes.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store