mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-28 09:08:54 +00:00
add requirements.txt, remove debug prints
This commit is contained in:
@@ -112,14 +112,14 @@ def normalize(wave, is_normalize=False):
|
||||
"""Save output music files"""
|
||||
maxv = np.abs(wave).max()
|
||||
if maxv > 1.0:
|
||||
print(f"\nNormalization Set {is_normalize}: Input above threshold for clipping. Max:{maxv}")
|
||||
#print(f"\nNormalization Set {is_normalize}: Input above threshold for clipping. Max:{maxv}")
|
||||
if is_normalize:
|
||||
print(f"The result was normalized.")
|
||||
# print(f"The result was normalized.")
|
||||
wave /= maxv
|
||||
else:
|
||||
print(f"The result was not normalized.")
|
||||
# print(f"The result was not normalized.")
|
||||
else:
|
||||
print(f"\nNormalization Set {is_normalize}: Input not above threshold for clipping. Max:{maxv}")
|
||||
#print(f"\nNormalization Set {is_normalize}: Input not above threshold for clipping. Max:{maxv}")
|
||||
|
||||
return wave
|
||||
|
||||
@@ -130,20 +130,20 @@ def normalize_two_stem(wave, mix, is_normalize=False):
|
||||
max_mix = np.abs(mix).max()
|
||||
|
||||
if maxv > 1.0:
|
||||
print(f"\nNormalization Set {is_normalize}: Primary source above threshold for clipping. Max:{maxv}")
|
||||
print(f"\nNormalization Set {is_normalize}: Mixture above threshold for clipping. Max:{max_mix}")
|
||||
#print(f"\nNormalization Set {is_normalize}: Primary source above threshold for clipping. Max:{maxv}")
|
||||
#print(f"\nNormalization Set {is_normalize}: Mixture above threshold for clipping. Max:{max_mix}")
|
||||
if is_normalize:
|
||||
print(f"The result was normalized.")
|
||||
#print(f"The result was normalized.")
|
||||
wave /= maxv
|
||||
mix /= maxv
|
||||
else:
|
||||
print(f"The result was not normalized.")
|
||||
#print(f"The result was not normalized.")
|
||||
else:
|
||||
print(f"\nNormalization Set {is_normalize}: Input not above threshold for clipping. Max:{maxv}")
|
||||
#print(f"\nNormalization Set {is_normalize}: Input not above threshold for clipping. Max:{maxv}")
|
||||
|
||||
|
||||
print(f"\nNormalization Set {is_normalize}: Primary source - Max:{np.abs(wave).max()}")
|
||||
print(f"\nNormalization Set {is_normalize}: Mixture - Max:{np.abs(mix).max()}")
|
||||
#print(f"\nNormalization Set {is_normalize}: Primary source - Max:{np.abs(wave).max()}")
|
||||
#print(f"\nNormalization Set {is_normalize}: Mixture - Max:{np.abs(mix).max()}")
|
||||
|
||||
return wave, mix
|
||||
|
||||
|
||||
Reference in New Issue
Block a user