Merge pull request #251 from Tps-F/Simplifying-expressions-resample

Simplifying expressions in resample.py
This commit is contained in:
YuriHead 2023-06-23 00:09:36 +08:00 committed by GitHub
commit 4654f05bd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ def process(item):
resampled_wav = resample_wav(wav, sr, args.sr2)
if not args.skip_loudnorm:
resampled_wav /= max(resampled_wav.max(), -resampled_wav.min())
resampled_wav /= np.max(np.abs(resampled_wav))
save_path2 = os.path.join(args.out_dir2, speaker, wav_name)
save_wav_to_path(resampled_wav, save_path2, args.sr2)