khalida1wwin
commited on
Commit
·
addc130
1
Parent(s):
fa0d485
update app.py
Browse files
app.py
CHANGED
@@ -198,12 +198,12 @@ def denoise_audio(audioName):
|
|
198 |
|
199 |
t = len_data / sample_rate # returns duration but in floats
|
200 |
print("t:",t)
|
201 |
-
weights_path = os.path.abspath("
|
202 |
name_model = "model_unet"
|
203 |
-
audio_dir_prediction = os.path.abspath("
|
204 |
-
dir_save_prediction = os.path.abspath("
|
205 |
-
audio_output_prediction = "test
|
206 |
-
audio_input_prediction = [
|
207 |
|
208 |
min_duration = t
|
209 |
frame_length = 8064
|
@@ -216,7 +216,7 @@ def denoise_audio(audioName):
|
|
216 |
prediction(weights_path, name_model, data, dir_save_prediction, audio_input_prediction,
|
217 |
audio_output_prediction, sample_rate, min_duration, frame_length, hop_length_frame, n_fft, hop_length_fft)
|
218 |
print(audio_output_prediction)
|
219 |
-
return audio_output_prediction
|
220 |
|
221 |
|
222 |
examples = [
|
|
|
198 |
|
199 |
t = len_data / sample_rate # returns duration but in floats
|
200 |
print("t:",t)
|
201 |
+
weights_path = os.path.abspath("./")
|
202 |
name_model = "model_unet"
|
203 |
+
audio_dir_prediction = os.path.abspath("./")
|
204 |
+
dir_save_prediction = os.path.abspath("./")
|
205 |
+
audio_output_prediction = "test.wav"
|
206 |
+
audio_input_prediction = ["1.wav"]
|
207 |
|
208 |
min_duration = t
|
209 |
frame_length = 8064
|
|
|
216 |
prediction(weights_path, name_model, data, dir_save_prediction, audio_input_prediction,
|
217 |
audio_output_prediction, sample_rate, min_duration, frame_length, hop_length_frame, n_fft, hop_length_fft)
|
218 |
print(audio_output_prediction)
|
219 |
+
return audio_output_prediction
|
220 |
|
221 |
|
222 |
examples = [
|