RVC-Boss / GPT-SoVITS

1 min voice data can also be used to train a good TTS model! (few shot voice cloning)
MIT License
35.58k stars 4.05k forks source link

尝试训练日文数据时出错 #33

Closed ADKcodeXD closed 10 months ago

ADKcodeXD commented 10 months ago

操作:一键三连后点击开始Sovits训练

"runtime\python" GPT_SoVITS/s2_train.py --config "TEMP/tmp_s2.json"
INFO:shun:{'train': {'log_interval': 100, 'eval_interval': 500, 'seed': 1234, 'epochs': 15, 'learning_rate': 0.0001, 'betas': [0.8, 0.99], 'eps': 1e-09, 'batch_size': 12, 'fp16_run': True, 'lr_decay': 0.999875, 'segment_size': 20480, 'init_lr_ratio': 1, 'warmup_epochs': 0, 'c_mel': 45, 'c_kl': 1.0, 'text_low_lr_rate': 0.4, 'pretrained_s2G': 'GPT_SoVITS/pretrained_models/s2G488k.pth', 'pretrained_s2D': 'GPT_SoVITS/pretrained_models/s2D488k.pth', 'if_save_latest': True, 'if_save_every_weights': True, 'save_every_epoch': 2, 'gpu_numbers': '0'}, 'data': {'max_wav_value': 32768.0, 'sampling_rate': 32000, 'filter_length': 2048, 'hop_length': 640, 'win_length': 2048, 'n_mel_channels': 128, 'mel_fmin': 0.0, 'mel_fmax': None, 'add_blank': True, 'n_speakers': 300, 'cleaned_text': True, 'exp_dir': 'logs/shun'}, 'model': {'inter_channels': 192, 'hidden_channels': 192, 'filter_channels': 768, 'n_heads': 2, 'n_layers': 6, 'kernel_size': 3, 'p_dropout': 0.1, 'resblock': '1', 'resblock_kernel_sizes': [3, 7, 11], 'resblock_dilation_sizes': [[1, 3, 5], [1, 3, 5], [1, 3, 5]], 'upsample_rates': [10, 8, 2, 2, 2], 'upsample_initial_channel': 512, 'upsample_kernel_sizes': [16, 16, 8, 2, 2], 'n_layers_q': 3, 'use_spectral_norm': False, 'gin_channels': 512, 'semantic_frame_rate': '25hz', 'freeze_quantizer': True}, 's2_ckpt_dir': 'logs/shun', 'content_module': 'cnhubert', 'save_weight_dir': 'SoVITS_weights', 'name': 'shun', 'pretrain': None, 'resume_step': None}
[W C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\distributed\c10d\socket.cpp:601] [c10d] The client socket has failed to connect to [TopPC4090]:54275 (system error: 10049 - 在其上下文中,该请求的地址无效。).
[W C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\distributed\c10d\socket.cpp:601] [c10d] The client socket has failed to connect to [TopPC4090]:54275 (system error: 10049 - 在其上下文中,该请求的地址无效。).
INFO:torch.distributed.distributed_c10d:Added key: store_based_barrier_key:1 to store for rank: 0
INFO:torch.distributed.distributed_c10d:Rank 0: Completed store-based barrier for key:store_based_barrier_key:1 with 1 nodes.
Traceback (most recent call last):
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\GPT_SoVITS\s2_train.py", line 402, in <module>
    main()
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\GPT_SoVITS\s2_train.py", line 53, in main
    mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,))
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\runtime\lib\site-packages\torch\multiprocessing\spawn.py", line 239, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\runtime\lib\site-packages\torch\multiprocessing\spawn.py", line 197, in start_processes
    while not context.join():
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\runtime\lib\site-packages\torch\multiprocessing\spawn.py", line 160, in join
    raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\runtime\lib\site-packages\torch\multiprocessing\spawn.py", line 69, in _wrap
    fn(i, *args)
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\GPT_SoVITS\s2_train.py", line 69, in run
    train_dataset = TextAudioSpeakerLoader(hps.data)########
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\GPT_SoVITS\module\data_utils.py", line 54, in __init__
    for _ in range(max(2, int(min_num / leng))):
ZeroDivisionError: division by zero

打标数据是之前bertvits2里面使用的,直接搬过来改成了绝对路径 image

AnyaCoder commented 10 months ago

因为 for _ in range(max(2, int(min_num / leng))):的leng是0,检查是否有如下文件 image

ADKcodeXD commented 10 months ago

因为 for _ in range(max(2, int(min_num / leng))):的leng是0,检查是否有如下文件 image

我重新在执行第一步1Aa-文本内容的时候,报以下错误 导致2-name2text.txt没有数据

"runtime\python" GPT_SoVITS/prepare_datasets/1-get-text.py
"runtime\python" GPT_SoVITS/prepare_datasets/1-get-text.py
雷门瞬_1.wav また私の工具箱勝手に持ってったのかよ、クソオヤジ Traceback (most recent call last):
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\GPT_SoVITS\prepare_datasets\1-get-text.py", line 74, in process
    phones, word2ph, norm_text=clean_text(text.replace("%", '-').replace('¥', ','),lan)
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\GPT_SoVITS\text\cleaner.py", line 18, in clean_text
    language_module = language_module_map[language]
KeyError: 'JP'

雷门瞬_3.wav ダサッ お前にはマジで言われたくねえ Traceback (most recent call last):
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\GPT_SoVITS\prepare_datasets\1-get-text.py", line 74, in process
    phones, word2ph, norm_text=clean_text(text.replace("%", '-').replace('¥', ','),lan)
  File "D:\AI workflow\Sound\GPT-SoVITS\GPT-SoVITS\GPT-SoVITS\GPT_SoVITS\text\cleaner.py", line 18, in clean_text
    language_module = language_module_map[language]
KeyError: 'JP'

其他的除了3-bert路径下没有文件外 其他都是有内容的

AnyaCoder commented 10 months ago

JP -> jp

ADKcodeXD commented 10 months ago

JP -> jp

哦哦 ,没发现这个错了,我试了一下,应该是ja 😂😂