khalida1wwin commited on
Commit
62d88ea
1 Parent(s): f79d23a

update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -138,7 +138,7 @@ def inv_scaled_ou(matrix_spec):
138
  return matrix_spec
139
 
140
 
141
- def prediction(weights_path, name_model, audioData, dir_save_prediction, audio_input_prediction,
142
  audio_output_prediction, sample_rate, min_duration, frame_length, hop_length_frame, n_fft, hop_length_fft):
143
  """ This function takes as input pretrained weights, noisy voice sound to denoise, predict
144
  the denoise sound and save it to disk.
@@ -205,7 +205,7 @@ def denoise_audio(audioName):
205
  audio_dir_prediction = os.path.abspath("./")
206
  dir_save_prediction = os.path.abspath("./")
207
  audio_output_prediction = "test.wav"
208
- audio_input_prediction = ["1.wav"]
209
 
210
  min_duration = t
211
  frame_length = 8064
@@ -215,7 +215,7 @@ def denoise_audio(audioName):
215
 
216
  dim_square_spec = int(n_fft / 2) + 1
217
 
218
- prediction(weights_path, name_model, data, dir_save_prediction, audio_input_prediction,
219
  audio_output_prediction, sample_rate, min_duration, frame_length, hop_length_frame, n_fft, hop_length_fft)
220
  print(audio_output_prediction)
221
  return audio_output_prediction
 
138
  return matrix_spec
139
 
140
 
141
+ def prediction(weights_path, name_model, audio_dir_prediction, dir_save_prediction, audio_input_prediction,
142
  audio_output_prediction, sample_rate, min_duration, frame_length, hop_length_frame, n_fft, hop_length_fft):
143
  """ This function takes as input pretrained weights, noisy voice sound to denoise, predict
144
  the denoise sound and save it to disk.
 
205
  audio_dir_prediction = os.path.abspath("./")
206
  dir_save_prediction = os.path.abspath("./")
207
  audio_output_prediction = "test.wav"
208
+ audio_input_prediction = ["temp.wav"]
209
 
210
  min_duration = t
211
  frame_length = 8064
 
215
 
216
  dim_square_spec = int(n_fft / 2) + 1
217
 
218
+ prediction(weights_path, name_model, audio_dir_prediction, dir_save_prediction, audio_input_prediction,
219
  audio_output_prediction, sample_rate, min_duration, frame_length, hop_length_frame, n_fft, hop_length_fft)
220
  print(audio_output_prediction)
221
  return audio_output_prediction