1
0
This commit is contained in:
mrq 2023-03-13 01:33:45 +00:00
parent 050bcefd73
commit 0cf9db5e69

View File

@ -1162,7 +1162,7 @@ def slice_dataset( voice, trim_silence=True, start_offset=0, end_offset=0 ):
if trim_silence:
sliced = torchaudio.functional.vad( sliced, sample_rate )
sliced, sample_rate = resample( sample_rate, 22050 )
sliced, sample_rate = resample( sliced, sample_rate, 22050 )
torchaudio.save(f"{indir}/audio/{file}", sliced, sample_rate)
segments +=1