mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-01-20 05:10:12 +08:00
Update data_utils.py (#407)
* Update envfilescheck.bat add pretrained_v2 and uvr5 update * Update envfilescheck.bat fix bug * Update envfilescheck.bat fix bug * Update data_utils.py fix bug where data exceeding 4s is filtered out.
This commit is contained in:
parent
a02019e428
commit
80929e472e
@ -38,7 +38,7 @@ class TextAudioLoaderMultiNSFsid(torch.utils.data.Dataset):
|
|||||||
for audiopath, text, pitch, pitchf, dv in self.audiopaths_and_text:
|
for audiopath, text, pitch, pitchf, dv in self.audiopaths_and_text:
|
||||||
if self.min_text_len <= len(text) and len(text) <= self.max_text_len:
|
if self.min_text_len <= len(text) and len(text) <= self.max_text_len:
|
||||||
audiopaths_and_text_new.append([audiopath, text, pitch, pitchf, dv])
|
audiopaths_and_text_new.append([audiopath, text, pitch, pitchf, dv])
|
||||||
lengths.append(os.path.getsize(audiopath) // (2 * self.hop_length))
|
lengths.append(os.path.getsize(audiopath) // (3 * self.hop_length))
|
||||||
self.audiopaths_and_text = audiopaths_and_text_new
|
self.audiopaths_and_text = audiopaths_and_text_new
|
||||||
self.lengths = lengths
|
self.lengths = lengths
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ class TextAudioLoader(torch.utils.data.Dataset):
|
|||||||
for audiopath, text, dv in self.audiopaths_and_text:
|
for audiopath, text, dv in self.audiopaths_and_text:
|
||||||
if self.min_text_len <= len(text) and len(text) <= self.max_text_len:
|
if self.min_text_len <= len(text) and len(text) <= self.max_text_len:
|
||||||
audiopaths_and_text_new.append([audiopath, text, dv])
|
audiopaths_and_text_new.append([audiopath, text, dv])
|
||||||
lengths.append(os.path.getsize(audiopath) // (2 * self.hop_length))
|
lengths.append(os.path.getsize(audiopath) // (3 * self.hop_length))
|
||||||
self.audiopaths_and_text = audiopaths_and_text_new
|
self.audiopaths_and_text = audiopaths_and_text_new
|
||||||
self.lengths = lengths
|
self.lengths = lengths
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user