step by step: install paddlespeech for windows

1 创建虚拟环境

conda create -n  paddletts python==3.8
conda activate paddletts

2 安装paddlespeech


(paddletts) G:\oddmeta>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:41:42_Pacific_Daylight_Time_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0



python -m pip install paddlepaddle-gpu==2.5.1.post112 -f


python -m pip install paddlepaddle-gpu==2.5.0 -f


pip install paddlepaddle==2.5.1 -i

我电脑上安装2.5.1后,运行paddlespeech报错,ModuleNotFoundError: No module named ‘paddle‘,移除安装,改用2.4.1后,可正常运行。

pip install paddlepaddle==2.4.1 -i

用pip 安装paddlespeech

pip install pytest-runner
pip install paddlespeech

默认安装的protobuf版本为protobuf 3.20.2,卸载了安装3.19

pip uninstall protobuf
pip install protobuf==3.19

默认安装的paddlenlp版本为paddlenlp 2.6.0rc0 依赖 protobuf==3.20.2

pip install paddlenlp==2.5

默认安装的NumPy的版本为NumPy 1.24.4,改成1.23.5

pip uninstall numpy
pip install numpy==1.23.5 -i


paddlespeech tts --input "你好,欢迎光临落鹤生的个人知识库,来随便问问吧!" --output output.wav

报错1:module ‘numpy’ has no attribute ‘complex’.

(paddletts) G:\oddmeta>paddlespeech tts --input "你好,欢迎光临落鹤生的个人知识库,来随便问问吧!" --output output.wav
Traceback (most recent call last):
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Administrator\.conda\envs\paddletts\Scripts\paddlespeech.exe\", line 7, in <module>
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\paddlespeech\cli\", line 40, in _execute
    exec("from {} import {}".format(module, cls))
  File "<string>", line 1, in <module>
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\paddlespeech\cli\tts\", line 14, in <module>
    from .infer import TTSExecutor
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\paddlespeech\cli\tts\", line 33, in <module>
    from paddlespeech.t2s.exps.syn_utils import get_am_inference
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\paddlespeech\t2s\", line 19, in <module>
    from . import models
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\paddlespeech\t2s\models\", line 14, in <module>
    from .ernie_sat import *
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\paddlespeech\t2s\models\ernie_sat\", line 14, in <module>
    from .ernie_sat import *
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\paddlespeech\t2s\models\ernie_sat\", line 21, in <module>
    from paddlespeech.t2s.modules.activation import get_activation
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\paddlespeech\t2s\modules\", line 16, in <module>
    from .losses import *
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\paddlespeech\t2s\modules\", line 16, in <module>
    import librosa
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\librosa\", line 211, in <module>
    from . import core
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\librosa\core\", line 9, in <module>
    from .constantq import *  # pylint: disable=wildcard-import
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\librosa\core\", line 1059, in <module>
  File "C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\numpy\", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:


pip uninstall numpy
pip install numpy==1.23.5 -i
paddlespeech tts --input "你好,欢迎光临落鹤生的个人知识库,来随便问问吧!" --output output.wav

报错2:The GPU architecture is not compatible with Paddle installation with arch: 70 75 80 86

(paddletts) G:\oddmeta>paddlespeech tts --input "你好,欢迎光临落鹤生的个人知识库,来随便问问吧!" --output output.wav
C:\Users\Administrator\.conda\envs\paddletts\lib\site-packages\_distutils_hack\ UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
100%|████████████████████████████████████████████████████████████████████████| 477172/477172 [00:55<00:00, 8532.29it/s]
100%|████████████████████████████████████████████████████████████████████████| 893777/893777 [01:35<00:00, 9310.48it/s]
100%|████████████████████████████████████████████████████████████████████████| 575056/575056 [01:02<00:00, 9129.47it/s]
100%|███████████████████████████████████████████████████████████████████████████████| 107k/107k [00:00<00:00, 1.49MB/s]
W0814 10:01:06.194772 492468] The GPU architecture in your current machine is Maxwell, which is not compatible with Paddle installation with arch: 70 75 80 86 , it is recommended to install the corresponding wheel package according to the installation information on the official Paddle website.
W0814 10:01:06.199754 492468] Please NOTE: device: 0, GPU Compute Capability: 5.0, Driver API Version: 12.0, Runtime API Version: 11.2
W0814 10:01:06.222723 492468] Note: [Recommend] copy cudnn into CUDA installation directory.
 For instance, download from NVIDIA's official website,
then, unzip it and copy it into C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0
You should do this according to your CUDA installation directory and CUDNN version.
RuntimeError: (PreconditionNotMet) The third-party dynamic library (cudnn64_8.dll) that Paddle depends on is not configured correctly. (error code is 126)
  1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed.
  2. Configure third-party dynamic library environment variables as follows:
  - Linux: set LD_LIBRARY_PATH by `export LD_LIBRARY_PATH=...`
  - Windows: set PATH by `set PATH=XXX; (at ..\paddle\phi\backends\dynload\


pip install paddlepaddle==2.4.1 -i

Leave a comment

Your email address will not be published. Required fields are marked *