mrfakename commited on
Commit
8150031
·
verified ·
1 Parent(s): 5f1e052

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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 = ''