[2noise/ChatTTS]小白,requirement的环境下载好了,为什么在infer.ipynb 里面的 import ChatTTS 就报错啊

2024-06-12 270 views
6

OSError Traceback (most recent call last) Cell In[26], line 1 ----> 1 import ChatTTS

File D:\代码\Tensor\ChatTTS\ChatTTS__init__.py:1 ----> 1 from .core import Chat

File D:\代码\Tensor\ChatTTS\ChatTTS\core.py:7 4 from omegaconf import OmegaConf 6 import torch ----> 7 from vocos import Vocos 8 from .model.dvae import DVAE 9 from .model.gpt import GPT_warpper

File ~\AppData\Roaming\Python\Python39\site-packages\vocos__init.py:1 ----> 1 from vocos.pretrained import Vocos 4 version__ = "0.1.0"

File ~\AppData\Roaming\Python\Python39\site-packages\vocos\pretrained.py:9 7 from huggingface_hub import hf_hub_download 8 from torch import nn ----> 9 from vocos.feature_extractors import FeatureExtractor, EncodecFeatures 10 from vocos.heads import FourierHead 11 from vocos.models import Backbone

File ~\AppData\Roaming\Python\Python39\site-packages\vocos\feature_extractors.py:4 1 from typing import List 3 import torch ----> 4 import torchaudio 5 from encodec import EncodecModel 6 from torch import nn

File ~\AppData\Roaming\Python\Python39\site-packages\torchaudio__init__.py:2 1 # Initialize extension and backend first ----> 2 from . import _extension # noqa # usort: skip 3 from ._backend import ( # noqa # usort: skip 4 AudioMetaData, 5 get_audio_backend, (...) 10 set_audio_backend, 11 ) 13 from . import ( # noqa: F401 14 compliance, 15 datasets, (...) 23 utils, 24 )

File ~\AppData\Roaming\Python\Python39\site-packages\torchaudio_extension__init__.py:38 36 _IS_ALIGN_AVAILABLE = False 37 if _IS_TORCHAUDIO_EXT_AVAILABLE: ---> 38 _load_lib("libtorchaudio") 40 import torchaudio.lib._torchaudio # noqa 42 _check_cuda_version()

File ~\AppData\Roaming\Python\Python39\site-packages\torchaudio_extension\utils.py:60, in _load_lib(lib) 58 if not path.exists(): 59 return False ---> 60 torch.ops.load_library(path) 61 return True

File c:\users\奇点\appdata\local\programs\python\python39\lib\site-packages\torch_ops.py:573, in load_library(self, path) 571 for a in self._schema.arguments: 572 if a.alias_info is None: --> 573 continue 574 if is_write is None: 575 is_write = a.alias_info.is_write

File c:\users***\appdata\local\programs\python\python39\lib\ctypes__init.py:374, in CDLL.init__(self, name, mode, handle, use_errno, use_last_error, winmode) 371 self._FuncPtr = _FuncPtr 373 if handle is None: --> 374 self._handle = _dlopen(self._name, mode) 375 else: 376 self._handle = handle

OSError: [WinError 127] 找不到指定的程序。

回答

7

好了我搞定了, torch version 有点低

6

我安装的2.3.0的torch,也报这个错误