Machine learning text-to-speech for your terminal. Hear text read aloud by realistic voices, from a file or your clipboard.
Find a file
2025-09-03 22:15:16 +02:00
.gitignore chore: add __pycache__ to gitignore 2025-09-03 22:14:35 +02:00
env.sh initial commit 2025-09-03 20:59:57 +02:00
main.py feat: show loading bar while playing audio 2025-09-03 22:15:04 +02:00
README.md chore: add usage to readme 2025-09-03 21:09:11 +02:00
requirements.txt chore: remove torch from requirements 2025-09-03 22:15:16 +02:00

Simple TTTS

A simple text to speech powered by kokoro.

Setup

Clone repo and go into the directory

$ git clone https://git.ayo.run/ayo/simple-tts
$ cd simple-tts

Create new environment. Here I use conda

$ conda create -n tts

Because I use an intel-based laptop, I use ipex-llm environment with pytorch 2.6

### for Intel XPU specific device usage:
$ conda create -n tts --clone llm-pt26

Activate the environment and install the dependencies

$ conda activate tts
$ python -m pip install -r requirements.txt

Because vlc to automatically play the generated audio, you will have to install it:

sudo apt update
sudo apt install vlc

Note

Installing vlc via flatpak or snap will not work, as the code need access to libvlc.

Intel XPU environmental variables

For XPUs, we need to set some environmental variables. I have added a env.sh script which will activate the conda environment tts and set the environmental variables.

$ . env.sh

Usage

To run the program it needs an input file. For example, using input.txt

$ python main.py input.txt