Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mrfakename
commited on
Commit
•
d3178d1
1
Parent(s):
15e36d5
Update app.py
Browse files
app.py
CHANGED
@@ -472,11 +472,11 @@ with gr.Blocks() as leaderboard:
|
|
472 |
|
473 |
# vote.load(reload, outputs=[aud1, aud2, model1, model2])
|
474 |
def doloudnorm(path):
|
475 |
-
data, rate = sf.read(path)
|
476 |
meter = pyln.Meter(rate)
|
477 |
loudness = meter.integrated_loudness(data)
|
478 |
loudness_normalized_audio = pyln.normalize.loudness(data, loudness, -12.0)
|
479 |
-
sf.write(path, loudness_normalized_audio, rate)
|
480 |
############
|
481 |
# 2x speedup (hopefully)
|
482 |
############
|
|
|
472 |
|
473 |
# vote.load(reload, outputs=[aud1, aud2, model1, model2])
|
474 |
def doloudnorm(path):
|
475 |
+
data, rate = sf.read(path, format='wav')
|
476 |
meter = pyln.Meter(rate)
|
477 |
loudness = meter.integrated_loudness(data)
|
478 |
loudness_normalized_audio = pyln.normalize.loudness(data, loudness, -12.0)
|
479 |
+
sf.write(path, loudness_normalized_audio, rate, format='wav')
|
480 |
############
|
481 |
# 2x speedup (hopefully)
|
482 |
############
|