Error while trying to install Coqui AI TTS to Python

1.9k Views Asked by At

I am getting this error when trying to install Coqui TTS for my Python Project. C++ Build tools version 14 is already properly installed. Please advise on how to fix this. Thank you!

Error Text:

  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
      [end of output]
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tts
Failed to build tts
ERROR: Could not build wheels for tts, which is required to install pyproject.toml-based projects
 
C:\Users\chris>      copying TTS\bin\compute_attention_masks.py -> temp_build\TTS\bin
 
 

I tried to look up the error and went into the Coqui community chatroom and asked in the Learn Python Discord but got no answer.

2

There are 2 best solutions below

0
Ataullha On

This problem happens on windows os devices mostly. there are 3 ways

  • install git cli in your windows device and run commands from there ( alike linux)
  • use linux os
  • the easiest way should use vm or colab/ azure/ kaggle karnel types platform for running your model
0
Sai Akarsh On

This is what I do for a simple Python installation to use CoquiTTS:
I would recommend using conda as your environment manager, but pip as your package manager (best of both worlds in my opinion). Using Linux is a plus! (if not use WSL in Windows, that's your best bet)

If you don't have conda installed use this link to install the latest Miniconda (simple and lightweight but has all the benefits of Anaconda)
For example, you could do the following,

wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh
sha256sum Miniconda3-py39_4.12.0-Linux-x86_64.sh
# should be: 78f39f9bae971ec1ae7969f0516017f2413f17796670f7040725dd83fcff5689
bash Miniconda3-py39_4.12.0-Linux-x86_64.sh

Once that is done, you create a new conda environment and install TTS

conda create --name coqui
conda activate coqui
conda install conda python=3.9 # works like a charm

# for a simple installation, just do
pip install TTS

# for a developer installation, do
git clone https://github.com/coqui-ai/TTS
cd TTS
pip install -e .[all,dev,notebooks]