如何在 Windows 上安装 PyTorch 进行实时语音克隆?

问题描述 投票:0回答:3

我遇到以下问题:我想安装 CorentinJ/Real-Time-Voice-Cloning 但 PyTorch 有问题。这是我已经完成的:

  • 下载了实时语音克隆存储库
  • 将预训练的模型下载到编码器、声码器和合成器文件夹中
  • 安装了ffmpeg
  • 成功运行
    pip install -r requirements.txt
  • 安装了 Anaconda
  • 使用
    conda install pytorch torchvision torchaudio cpuonly -c pytorch
  • 成功安装 PyTorch

但是,当使用

python demo_cli.py
检查安装时,我收到错误:

ModuleNotFoundError: No module named 'torch'

然后,我尝试使用 Pip 安装 PyTorch,使用以下命令https://pytorch.org/get-started/locally

pip3 install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

但我收到错误:

ERROR: Could not find a version that satisfies the requirement torch==1.8.1+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.8.1+cpu

另外,我尝试了

pip3 install torch
(和
pip install torch
)但收到错误:
ModuleNotFoundError: No module named 'tools.nnwrap'
。我能够安装
tools
,但没有成功安装
nnwrap

我该怎么做才能使实时语音克隆发挥作用?我是否必须使用 CUDA for PyTorch 才能工作?

我的Python版本:3.7.4

python pytorch conda
3个回答
0
投票

您可以仅安装 cpu pytorch 和声码器、合成器、编码器文件,这些文件可在 CoretinJ 实时语音克隆的 github 存储库上找到。然后执行:python demo_toolbox.py,您将获得 GUI 或 python demo_cli.py 以使用 CLI。


0
投票

你的 pip/pip3 和 python/python3 不是同一个路径/可执行文件!有同样的错误!


-1
投票

解决方案:我不知道我必须使用 Anaconda Prompt 来运行

python demo_cli.py
。然后就可以了。

© www.soinside.com 2019 - 2024. All rights reserved.