Update app.py
Browse files
app.py
CHANGED
@@ -153,6 +153,7 @@ class AudioUpscaler:
|
|
153 |
original_lengths = []
|
154 |
start = 0
|
155 |
while start < len(audio):
|
|
|
156 |
end = min(start + chunk_samples, len(audio))
|
157 |
chunk = audio[start:end]
|
158 |
if len(chunk) < chunk_samples:
|
@@ -185,6 +186,7 @@ class AudioUpscaler:
|
|
185 |
meter_after = pyln.Meter(self.sr)
|
186 |
|
187 |
for i, chunk in enumerate(chunks_ch1):
|
|
|
188 |
loudness_before = meter_before.integrated_loudness(chunk)
|
189 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=True) as temp_wav:
|
190 |
sf.write(temp_wav.name, chunk, sr)
|
@@ -234,6 +236,7 @@ class AudioUpscaler:
|
|
234 |
if is_stereo:
|
235 |
reconstructed_ch2 = np.zeros((1, total_length))
|
236 |
for i, chunk in enumerate(chunks_ch2):
|
|
|
237 |
loudness_before = meter_before.integrated_loudness(chunk)
|
238 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=True) as temp_wav:
|
239 |
sf.write(temp_wav.name, chunk, sr)
|
|
|
153 |
original_lengths = []
|
154 |
start = 0
|
155 |
while start < len(audio):
|
156 |
+
print(f"{start} / {len(audio)}")
|
157 |
end = min(start + chunk_samples, len(audio))
|
158 |
chunk = audio[start:end]
|
159 |
if len(chunk) < chunk_samples:
|
|
|
186 |
meter_after = pyln.Meter(self.sr)
|
187 |
|
188 |
for i, chunk in enumerate(chunks_ch1):
|
189 |
+
print(f"{i} / {len(chunks_ch1)}")
|
190 |
loudness_before = meter_before.integrated_loudness(chunk)
|
191 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=True) as temp_wav:
|
192 |
sf.write(temp_wav.name, chunk, sr)
|
|
|
236 |
if is_stereo:
|
237 |
reconstructed_ch2 = np.zeros((1, total_length))
|
238 |
for i, chunk in enumerate(chunks_ch2):
|
239 |
+
print(f"{i} / {len(chunks_ch2)}")
|
240 |
loudness_before = meter_before.integrated_loudness(chunk)
|
241 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=True) as temp_wav:
|
242 |
sf.write(temp_wav.name, chunk, sr)
|