N.O.V.A v2 / documentation

Installation & Environment

Create the isolated Python environment, pin the packages, and install them so the GPU build of PyTorch is used.

Requirements

  • Python 3.11, the version this setup is tested on. Check with python --version
  • An NVIDIA GPU with a current driver, for the cloned voice. Check with nvidia-smi. Everything else runs without one
  • About 10 GB of free disk space: PyTorch alone is about 2.5 GB and the XTTS model about 2 GB
  • A stable connection. Large downloads resume on their own if they time out
Platform

The commands below are for Windows PowerShell. On macOS or Linux, activate with source .venv-tts/bin/activate and set variables with export. CUDA builds of PyTorch are for NVIDIA GPUs only.

Create the environment

Create it inside the project folder. Don't pass --system-site-packages: that lets the environment borrow packages from your global Python, and installs can then change packages other projects depend on.

cd N.O.V.A
python -m venv .venv-tts
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
.\.venv-tts\Scripts\Activate.ps1

The Set-ExecutionPolicy line only applies to the current terminal, and is needed if PowerShell refuses to run the activation script. The prompt should now start with (.venv-tts).

Check that the environment is isolated before installing anything:

python -m pip -V
python -m pip list
  • pip -V should show a path inside .venv-tts
  • pip list should show only pip and setuptools

If the list shows dozens of packages, delete the folder and recreate it with the plain command above. From here on, always use python -m pip and check for the (.venv-tts) prefix in your prompt, so packages install into the environment you are actually running.

Keep downloads off your system drive

Pip and the model libraries use temporary and cache folders on the system drive by default, even when the environment lives elsewhere. Point them at the drive you want before installing. Replace D: with your own drive; these last for the current terminal only.

mkdir D:\Temp, D:\pip-cache -Force
$env:TEMP = "D:\Temp"
$env:TMP = "D:\Temp"
$env:PIP_CACHE_DIR = "D:\pip-cache" 

Model locations are set permanently with TTS_HOME and HF_HOME. See Settings.

The package list

These are the voice and audio lines of requirements.txt. They are pinned so pip can't quietly pick an incompatible build:

--extra-index-url https://download.pytorch.org/whl/cu121

torch==2.5.1+cu121
torchaudio==2.5.1+cu121
transformers==4.57.6
coqui-tts==0.27.5
sounddevice
soundfile
pyttsx3
SpeechRecognition
PyAudio==0.2.14
python-dotenv
LineWhy
--extra-index-url ...cu121Lets pip find PyTorch's CUDA builds as well as normal PyPI packages
torch==2.5.1+cu121, torchaudio==2.5.1+cu121The +cu121 suffix stops pip choosing the CPU-only build, which can't use the GPU. 2.5.1 is the newest build published for cu121
transformers==4.57.6transformers 5.x needs PyTorch 2.6 or newer. With torch 2.5.1 it disables PyTorch, and Coqui TTS then reports torch as missing
coqui-tts==0.27.5The maintained fork that provides XTTS-v2. Not the old TTS package
PyAudio==0.2.14Needed for microphone input

Don't list numpy, librosa or similar. They arrive automatically with coqui-tts.

Install

python -m pip install --upgrade pip
python -m pip install -r requirements.txt --no-cache-dir
  • The torch download is about 2.5 GB, so the first install takes a while. If pip prints a timeout warning it resumes the download itself. If it stops completely, rerun the same command
  • --no-cache-dir avoids a pip MemoryError caused by loading a huge cached download into RAM
  • If it still runs out of memory, close heavy apps such as browser tabs or Ollama and retry

Verify the install

python -c "import torch, transformers; print(torch.__version__, torch.cuda.is_available(), transformers.__version__)"

Expected output: 2.5.1+cu121 True 4.57.6. If torch shows +cpu or False, reinstall the GPU build without touching the other packages:

python -m pip install torch==2.5.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu121 --force-reinstall --no-deps --no-cache-dir
Check again after every install

Another package can swap in a CPU build of torch. Run the check above after each later pip install.

Then confirm there are no dependency conflicts, and that packages really live inside the environment:

python -m pip check
python -c "import torch, TTS; print(torch.__file__); print(TTS.__file__)"

Both printed paths should be inside the .venv-tts folder.

Lock the versions

Once everything works, record the exact version of every package:

python -m pip freeze > requirements.lock.txt

Keep requirements.txt as the readable list. If you rebuild from the lock file, keep the --extra-index-url line at the top of it, because freeze doesn't write that line.

Next steps