Update resample.py change loudness -12

This commit is contained in:
YuriHead 2023-05-22 01:53:41 +08:00 committed by GitHub
parent d9a83ceabf
commit b5b5acec88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def process(item):
wav2 = librosa.resample(wav, orig_sr=sr, target_sr=args.sr2) wav2 = librosa.resample(wav, orig_sr=sr, target_sr=args.sr2)
meter = pyln.Meter(args.sr2) meter = pyln.Meter(args.sr2)
loudness = meter.integrated_loudness(wav2) loudness = meter.integrated_loudness(wav2)
wav2 = pyln.normalize.loudness(wav2, loudness, -23.0) wav2 = pyln.normalize.loudness(wav2, loudness, -12.0)
# wav2 /= max(wav2.max(), -wav2.min()) # wav2 /= max(wav2.max(), -wav2.min())
save_name = wav_name save_name = wav_name
save_path2 = os.path.join(args.out_dir2, speaker, save_name) save_path2 = os.path.join(args.out_dir2, speaker, save_name)