(cosyvoice) root@dsw-761301-647cf76bc5-qvcvl:/mnt/workspace/CosyVoice# python test.py

2024-12-04 23:32:41,412 - modelscope - INFO - PyTorch version 2.0.1+cu118 Found.

2024-12-04 23:32:41,423 - modelscope - INFO - Loading ast index from /mnt/workspace/.cache/modelscope/ast_indexer

2024-12-04 23:32:43,748 - modelscope - INFO - No valid ast index found from /mnt/workspace/.cache/modelscope/ast_indexer, generating ast index from prebuilt!

2024-12-04 23:32:44,633 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 0a442fc799847ae80825edec6b8b8458 and a total number of 980 components indexed

transformer is not installed, please install it if you want to use related modules

Traceback (most recent call last):

File "test.py", line 6, in

from cosyvoice.cli.cosyvoice import CosyVoice

File "/mnt/workspace/CosyVoice/cosyvoice/cli/cosyvoice.py", line 20, in

from cosyvoice.cli.frontend import CosyVoiceFrontEnd

File "/mnt/workspace/CosyVoice/cosyvoice/cli/frontend.py", line 20, in

import torchaudio.compliance.kaldi as kaldi

File "/mnt/workspace/myConda/envs/cosyvoice/lib/python3.8/site-packages/torchaudio/__init__.py", line 2, in

from . import _extension # noqa # usort: skip

File "/mnt/workspace/myConda/envs/cosyvoice/lib/python3.8/site-packages/torchaudio/_extension/__init__.py", line 38, in

_load_lib("libtorchaudio")

File "/mnt/workspace/myConda/envs/cosyvoice/lib/python3.8/site-packages/torchaudio/_extension/utils.py", line 60, in _load_lib

torch.ops.load_library(path)

File "/mnt/workspace/myConda/envs/cosyvoice/lib/python3.8/site-packages/torch/_ops.py", line 643, in load_library

ctypes.CDLL(path)

File "/mnt/workspace/myConda/envs/cosyvoice/lib/python3.8/ctypes/__init__.py", line 373, in __init__

self._handle = _dlopen(self._name, mode)

OSError: /mnt/workspace/myConda/envs/cosyvoice/lib/python3.8/site-packages/torchaudio/lib/libtorchaudio.so: undefined symbol: _ZNK3c105Error4whatEv

Solution

Just run python script again.