Update data_utils.py
This commit is contained in:
@@ -4,7 +4,6 @@ import random
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
import torch.utils.data
|
import torch.utils.data
|
||||||
import tqdm
|
|
||||||
import commons
|
import commons
|
||||||
from mel_processing import spectrogram_torch, mel_spectrogram_torch, spec_to_mel_torch
|
from mel_processing import spectrogram_torch, mel_spectrogram_torch, spec_to_mel_torch
|
||||||
from utils import load_wav_to_torch, load_filepaths_and_text
|
from utils import load_wav_to_torch, load_filepaths_and_text
|
||||||
@@ -56,8 +55,7 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
|
|||||||
audiopaths_sid_text_new = []
|
audiopaths_sid_text_new = []
|
||||||
lengths = []
|
lengths = []
|
||||||
skipped = 0
|
skipped = 0
|
||||||
print("Init dataset...")
|
for _id, spk, language, text, phones, tone, word2ph in self.audiopaths_sid_text:
|
||||||
for _id, spk, language, text, phones, tone, word2ph in tqdm(self.audiopaths_sid_text):
|
|
||||||
audiopath = f'{_id}'
|
audiopath = f'{_id}'
|
||||||
if self.min_text_len <= len(phones) and len(phones) <= self.max_text_len:
|
if self.min_text_len <= len(phones) and len(phones) <= self.max_text_len:
|
||||||
phones = phones.split(" ")
|
phones = phones.split(" ")
|
||||||
|
|||||||
Reference in New Issue
Block a user