It is currently Mon 27-Mar-2023 01:43

[SOLVED] How to install coqui-ai TTS on Manjaro and use it with a simple command?

OptimusPrime

@OptimusPrime@lemmy.ml
Joined:Mon 18-Apr-2022 23:55

[SOLVED] How to install coqui-ai TTS on Manjaro and use it with a simple command?

Post by @OptimusPrime@lemmy.ml »

Since coqui-ai TTS isn't in the AUR I have to install it manually.

When I install it directly with
pip install TTS
it installs but at the end of the installation I get the error
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
typer 0.3.2 requires click<7.2.0,>=7.1.1, but you have click 8.1.3 which is incompatible.
google-api-core 2.10.0 requires protobuf<5.0.0dev,>=3.20.1, but you have protobuf 3.19.6 which is incompatible.
To avoid this error I think I should install it in a virtual environment, but I want to be able to use it like
ttst text wav
using a function like
ttst() {
  cat $1 | sentences | xargs -0 tts --model_name "tts_models/en/ljspeech/tacotron2-DDC"  --out_path "${2:-out.wav}" --text
}
and I don't know how to do that if I install it in a virtual environment.

If there is a simpler way just forget what I said. What I want to know is the answer to the title.

sentences refers to the sentences-bin package, required to tokenize the text in sentences, as coqui TTS only works on sentences.