Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教:出现错误'NoneType' object has no attribute 'inference' #17

Open
season-studio opened this issue Mar 30, 2022 · 4 comments
Open

Comments

@season-studio
Copy link

我采用pip直接安装ttskit包,运行环境为Ubuntu18.04 + Python3.8.0。
用tscli运行时,出现以下错误:
Input text (输入文本或exit退出,不输入则随机):
你好
Input kwargs (输入控制参数,格式:audio=1,speaker=biaobei,不输入则默认)

dictionary update sequence element #0 has length 1; 2 is required
Text: 你好
Kwargs: {'audio': '6', 'speaker': 'tmp'}
TTS running ...
INFO:sdk_api:Synthesizing: 你好
load phrase: 36778it [00:00, 239649.94it/s]
load pinyin: 41459it [00:00, 592173.16it/s]
Building prefix dict from the default dictionary ...
DEBUG:jieba:Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
DEBUG:jieba:Loading model from cache /tmp/jieba.cache
Loading model cost 0.393 seconds.
DEBUG:jieba:Loading model cost 0.393 seconds.
Prefix dict has been built successfully.
DEBUG:jieba:Prefix dict has been built successfully.
Traceback (most recent call last):
File "/home/season/.local/bin/tkcli", line 8, in
sys.exit(tts_cli())
File "/home/season/.local/lib/python3.8/site-packages/ttskit/cli_api.py", line 155, in tts_cli
sdk_api.tts_sdk(text=text,
File "/home/season/.local/lib/python3.8/site-packages/ttskit/sdk_api.py", line 425, in tts_sdk
wav = tts_sdk_base_one(kw)
File "/home/season/.local/lib/python3.8/site-packages/ttskit/sdk_api.py", line 395, in tts_sdk_base_one
return tts_sdk_base(**kwargs)
File "/home/season/.local/lib/python3.8/site-packages/ttskit/sdk_api.py", line 377, in tts_sdk_base
wavs = melgan.generate_wave(mel=mels_postnet)
File "/home/season/.local/lib/python3.8/site-packages/ttskit/melgan/inference.py", line 63, in generate_wave
wav = _model.inference(mel)
AttributeError: 'NoneType' object has no attribute 'inference'

@hemath1001
Copy link

window10、python3.7同样的问题!如果用sdk_api.tts_sdk的话合成出来是尖锐噪音。

@renewii
Copy link

renewii commented Apr 7, 2022

mac 3.7 同样问题

@liu-ioa
Copy link

liu-ioa commented May 13, 2022

解决了吗

@angeleyeKJ
Copy link

我也遇到了,发现作者在调用的时候少传了参数。。奇怪用from ttskit import sdk_api就是好的。

ttskit/sdk_api.py", line 377,
wavs = melgan.generate_wave(mel=mels_postnet)

可以改成:

    kwargs = {'model_path': _rtvc_melgan_path}
    wavs = melgan.generate_wave(mel=mels_postnet, **kwargs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants