C:\ProgramData\Anaconda3\envs\mockingbird\python.exe E:\workspace\MockingBird\control\cli\vocoder_train.py my_run e:\datasets
Traceback (most recent call last):
File "E:\workspace\MockingBird\control\cli\vocoder_train.py", line 4, in
from models.vocoder.fregan.train import train as train_fregan
File "E:\workspace\MockingBird\models\vocoder\fregan\train.py", line 15, in
from models.vocoder.fregan.discriminator import ResWiseMultiPeriodDiscriminator, ResWiseMultiScaleDiscriminator
File "E:\workspace\MockingBird\models\vocoder\fregan\discriminator.py", line 6, in
from models.vocoder.fregan.utils import get_padding
ImportError: cannot import name 'get_padding' from 'models.vocoder.fregan.utils' (E:\workspace\MockingBird\models\vocoder\fregan\utils.py)
Process finished with exit code 1
5条答案
按热度按时间kh212irz1#
get_padding 从老版本代码中恢复,但hpparams参数配置不匹配。
运行以下命令日志如下:
C:\ProgramData\Anaconda3\envs\mockingbird\python.exe E:\workspace\MockingBird\control\cli\vocoder_train.py my_run e:\datasets wavernn -m E:\workspace\MockingBird\data\ckpt\vocoder\saved_models
Traceback (most recent call last):
File "E:\workspace\MockingBird\control\cli\vocoder_train.py", line 68, in
train(**vars(args))
File "E:\workspace\MockingBird\models\vocoder\wavernn\train.py", line 21, in train
assert np.cumprod(hp.voc_upsample_factors)[-1] == hp.hop_length
AssertionError
Arguments:
run_id: my_run
vocoder_type: wavernn
syn_dir: e:\datasets\SV2TTS\synthesizer
voc_dir: e:\datasets\SV2TTS\vocoder
models_dir: E:\workspace\MockingBird\data\ckpt\vocoder\saved_models
ground_truth: False
save_every: 1000
backup_every: 25000
force_restart: False
config: models/vocoder/hifigan/config_16k_.json
256
200
Process finished with exit code 1
可以修改models/synthesizer/hpparams.py中voc_upsample_factors = (5, 5, 8) 参数为: voc_upsample_factors = (4, 8, 8)吗?
vhmi4jdf2#
你好,请问问题解决了吗
xmakbtuz3#
你好,请问问题解决了吗
我也遇到了这个问题,请问怎么解决
kcugc4gi4#
我也遇到了这个问题
sg2wtvxw5#
我也碰到了这个问题。后来是在工程中 discriminator.py进行修改。
变更了如下代码。
但是之后会碰到上面那位voc_upsample_factors 的问题
可能需要更改models\synthesizer\hparams.py的hop_size为200