chore: add instructions for using voices on the readme file

This commit is contained in:
Ayo Ayco 2025-09-03 23:05:57 +02:00
parent fd53cdb529
commit e5a58030a9

View file

@ -11,19 +11,18 @@ $ git clone https://git.ayo.run/ayo/simple-tts
$ cd simple-tts $ cd simple-tts
``` ```
Create new environment. Here I use `conda` Create new environment. Here I use `conda`.
```bash ```bash
$ conda create -n tts $ conda create -n tts
```
Because I use an intel-based laptop, I use [ipex-llm environment with pytorch 2.6](https://git.ayo.run/ayo/ipex-llm/src/branch/main/docs/mddocs/Quickstart/install_pytorch26_gpu.md)
```bash
### for Intel XPU specific device usage: ### for Intel XPU specific device usage:
$ conda create -n tts --clone llm-pt26 $ conda create -n tts --clone llm-pt26
``` ```
> [!Note]
> For using Intel XPUs, see section below
Activate the environment and install the dependencies Activate the environment and install the dependencies
```bash ```bash
@ -43,6 +42,8 @@ sudo apt install vlc
## Intel XPU environmental variables ## Intel XPU environmental variables
Because I use an intel-based laptop, I use [ipex-llm environment with pytorch 2.6](https://git.ayo.run/ayo/ipex-llm/src/branch/main/docs/mddocs/Quickstart/install_pytorch26_gpu.md).
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. 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.
```bash ```bash
@ -51,8 +52,25 @@ $ . env.sh
## Usage ## Usage
To run the program it needs an input file using the flag `--input`. Optionally, you can indicate a [voice](https://huggingface.co/hexgrad/Kokoro-82M/blob/main/VOICES.md) you want to use with `--voice`. To run the program it needs an input file using the flag `--input`.
```bash ```bash
$ python tts.py --input demo/tongue-twister.txt --voice asmr $ python tts.py --input demo/tongue-twister.txt --voice asmr
``` ```
### Voices
Optionally, you can indicate a [voice](https://huggingface.co/hexgrad/Kokoro-82M/blob/main/VOICES.md) you want to use with `--voice`.
```bash
python tts.py --voice am_michael
```
There are four shortcuts available to the best voices: pro, hot, asmr, brit (i.e., best trained voices), and `pro` is the default if no value is given
```bash
python tts.py --voice pro
python tts.py --voice hot
python tts.py --voice asmr
python tts.py --voice brit
```