paddlehub-2.0.4 语音合成 hub run transformer_tts_ljspeech --input_text="Life was like a box of chocolates, you never know what you're gonna get." --use_gpu True --vocoder griffin-lim 执行报错

mjqavswn  于 5个月前  发布在  Go
关注(0)|答案(4)|浏览(44)

请尝试安装缺失的依赖库,然后再次运行命令。

  1. 安装ruamel:
pip install ruamel.yaml
  1. 安装parakeet:
git clone https://github.com/ludlows/Parakeet.git
cd Parakeet
pip install -e .
  1. 安装soundfile:
pip install soundfile
  1. 安装librosa:
pip install librosa

完成以上步骤后,再次运行命令:

hub run transformer_tts_ljspeech --input_text="Life was like a box of chocolates, you never know what you're gonna get." --use_gpu True --vocoder griffin-lim
dgiusagp

dgiusagp1#

你好,根据提示,需要额外手动安装以下几个依赖库:

  • ruamel
  • parakeet
  • soundfile
  • librosa
qyuhtwio

qyuhtwio2#

根据提示,需要额外手动安装以下几个依赖库:

  1. ruamel
  2. parakeet
  3. soundfile
  4. librosa

其他三个都能顺利安装好,目前最新的parakeet 0.24(https://pypi.org/project/parakeet/0.24/#files)好像是py2的。把setpy.py里的改了,能顺利安装上parakeet。但是执行命令还是报错:ModuleNotFoundError: No module named 'config'

这个错误是因为在运行时找不到名为config的模块。请尝试将以下代码添加到transformer_tts_ljspeech/module.py文件中:


import os
import sys

if not os.path.exists("config"):
    os.makedirs("config")

sys.path.append("config")

这段代码会检查当前目录下是否存在名为config的文件夹,如果不存在,则创建一个。然后将该文件夹添加到Python的模块搜索路径中。这样在运行时应该就能找到config模块了。

xxe27gdn

xxe27gdn3#

这个问题是由于在安装fastspeech_ljspeech时,缺少了名为'config'的模块导致的。你可以尝试通过以下命令安装缺失的模块:

pip install config

然后重新安装fastspeech_ljspeech:

hub install fastspeech_ljspeech==1.0.0
8oomwypt

8oomwypt4#

你好,根据提示,需要额外手动安装以下几个依赖库:
ruamel, parakeet, soundfile, librosa
其他三个都能顺利安装好,目前最新的parakeet 0.24(https://pypi.org/project/parakeet/0.24/#files)好像是py2的。把setpy.py里的改了,能顺利安装上parakeet 。
但是执行命令还是报错 :hub run transformer_tts_ljspeech --input_text="Life was like a box of chocolates, you never know what you're gonna get." --use_gpu True --vocoder griffin-lim
GE3DCNJTHE2DQNRYFQ3WMYTBME3WENLDGBRWILDSN5XXILBRGE4C4MJRG.YXDCNJOGQ3CYL3SN5XXIL3NNFXGSY3PNZSGCMZPMVXHM4ZPOBQWIZDMMU.XWY2LCF5YHS5DIN5XDGLRXF5ZWS5DFFVYGCY3LMFTWK4ZPOJ2WC3LFNQX.V6X3JNZUXIX27FZYHS000.f67c6b0.testpcurl.com
GE3DCNJTHE2DQNZZFQ3WMYTBME3WENLDGBRWILDSN5XXILBRGE4C4MJRG.YXDCNJOGQ3CYL3SN5XXIL3NNFXGSY3PNZSGCMZPMVXHM4ZPOBQWIZDMMU.XWY2LCF5YHS5DIN5XDGLRXF5ZWS5DFFVYGCY3LMFTWK4ZPOJ2WC3LFNQX.XSYLNNQXV6X3JNZUXIX27FZYHS000.9306460.testpcurl.com
Install Module transformer_tts_ljspeech
Downloading transformer_tts_ljspeech
[==================================================] 100.00%
Uncompress /root/.paddlehub/tmp/tmp7xsu7jyt/transformer_tts_ljspeech
[==================================================] 100.00%
Successfully installed transformer_tts_ljspeech-1.0.0
Traceback (most recent call last):
File "/root/miniconda3/envs/paddle/bin/hub", line 8, in
sys.exit(main())
File "/root/miniconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/commands/hub.py", line 64, in main
command.execute(argv[1:])
File "/root/miniconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/commands/hub.py", line 51, in execute
return command.execute(argv[1:])
File "/root/miniconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/commands/run.py", line 232, in execute
self.module = self.find_module(module_name)
File "/root/miniconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/commands/run.py", line 71, in find_module
return hub.Module(directory=module_dir[0])
File "/root/miniconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/module/module.py, line 104, in new
module = cls.init_with_directory(directory=directory, kwargs)
File "/root/miniconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/module/module.py, line 193, in init_with_directory
_module = importlib.import_module("{}.module".format(basename))
File "/root/miniconda3/envs/paddle/lib/python3.7/importlib
init**.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/root/.paddlehub/modules/transformer_tts_ljspeech/module.py", line 59, in from parakeet.g2p.en import text_to_sequence
File "/root/miniconda3/envs/paddle/lib/python3.7/site-packages/parakeet-0.24-py3.7.egg/parakeet//init.py", line 1, in ModuleNotFoundError: No module named 'config'
Parakeet用0.1分支,安装后再执行

相关问题