Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,7 @@ def trim_silence(filename, threshold=0.1, duration=0.5):
|
|
19 |
if end - start > duration_samples:
|
20 |
trimmed_audio.extend(y[start:end])
|
21 |
trimmed_audio = np.array(trimmed_audio)
|
|
|
22 |
return trimmed_audio, sr
|
23 |
def gen(piano_only, length):
|
24 |
midi = ''
|
|
|
19 |
if end - start > duration_samples:
|
20 |
trimmed_audio.extend(y[start:end])
|
21 |
trimmed_audio = np.array(trimmed_audio)
|
22 |
+
librosa.output.write_wav(filename, y, sr=sr)
|
23 |
return trimmed_audio, sr
|
24 |
def gen(piano_only, length):
|
25 |
midi = ''
|