khalida1wwin
commited on
Commit
·
a5cddb7
1
Parent(s):
6ce5a25
update app.py
Browse files
app.py
CHANGED
@@ -191,17 +191,17 @@ audio_output_prediction, sample_rate, min_duration, frame_length, hop_length_fra
|
|
191 |
|
192 |
def denoise_audio(audioName):
|
193 |
testNo = audioName
|
194 |
-
audio_dir_prediction = "/
|
195 |
sample_rate, data = wavfile.read(audio_dir_prediction)
|
196 |
len_data = len(data) # holds length of the numpy array
|
197 |
|
198 |
|
199 |
t = len_data / sample_rate # returns duration but in floats
|
200 |
print("t:",t)
|
201 |
-
weights_path = "/
|
202 |
name_model = "model_unet"
|
203 |
-
audio_dir_prediction = "/
|
204 |
-
dir_save_prediction = "/
|
205 |
audio_output_prediction = "test"+ testNo+".wav"
|
206 |
audio_input_prediction = [testNo +".wav"]
|
207 |
sample_rate = 8000
|
|
|
191 |
|
192 |
def denoise_audio(audioName):
|
193 |
testNo = audioName
|
194 |
+
audio_dir_prediction = os.path.abspath("/")+ str(testNo[0]) +".wav"
|
195 |
sample_rate, data = wavfile.read(audio_dir_prediction)
|
196 |
len_data = len(data) # holds length of the numpy array
|
197 |
|
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"+ testNo+".wav"
|
206 |
audio_input_prediction = [testNo +".wav"]
|
207 |
sample_rate = 8000
|