mirror of
https://github.com/pstrueb/piper.git
synced 2026-05-29 16:15:51 +00:00
Skip empty audio files
This commit is contained in:
@@ -398,7 +398,12 @@ def ljspeech_dataset(
|
|||||||
# Try with .wav
|
# Try with .wav
|
||||||
wav_path = wav_dir / f"{filename}.wav"
|
wav_path = wav_dir / f"{filename}.wav"
|
||||||
|
|
||||||
if (not skip_audio) and (not wav_path.exists()):
|
wav_exists = wav_exists.exists()
|
||||||
|
if (not skip_audio) and wav_exists and (wav_path.stat().st_size == 0):
|
||||||
|
_LOGGER.warning("Empty file: %s", wav_path)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if (not skip_audio) and (not wav_exists):
|
||||||
_LOGGER.warning("Missing %s", filename)
|
_LOGGER.warning("Missing %s", filename)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user