added some prints for debug
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def load_hidden(audio_in):
|
|
56 |
return audio_in
|
57 |
|
58 |
def load_hidden_mic(audio_in):
|
59 |
-
print("
|
60 |
|
61 |
library_path = 'bark_voices'
|
62 |
folder_name = 'audio-0-100'
|
@@ -65,23 +65,24 @@ def load_hidden_mic(audio_in):
|
|
65 |
folder_path = os.path.join(library_path, folder_name)
|
66 |
second_folder_path = os.path.join(library_path, second_folder_name)
|
67 |
|
|
|
68 |
if os.path.exists(folder_path):
|
69 |
try:
|
70 |
shutil.rmtree(folder_path)
|
71 |
-
print(f"Successfully deleted the folder: {folder_path}")
|
72 |
except OSError as e:
|
73 |
print(f"Error: {folder_path} - {e.strerror}")
|
74 |
else:
|
75 |
-
print(f"
|
76 |
|
77 |
if os.path.exists(second_folder_path):
|
78 |
try:
|
79 |
shutil.rmtree(second_folder_path)
|
80 |
-
print(f"Successfully deleted the folder: {second_folder_path}")
|
81 |
except OSError as e:
|
82 |
print(f"Error: {second_folder_path} - {e.strerror}")
|
83 |
else:
|
84 |
-
print(f"
|
85 |
|
86 |
return audio_in
|
87 |
|
@@ -89,12 +90,14 @@ def clear_clean_ckeck():
|
|
89 |
return False
|
90 |
|
91 |
def wipe_npz_file(folder_path):
|
|
|
92 |
if os.path.exists(folder_path):
|
|
|
93 |
#shutil.rmtree(folder_path)
|
94 |
-
print(folder_path)
|
95 |
else :
|
96 |
-
print("path does not exists yet")
|
97 |
-
|
|
|
98 |
|
99 |
def split_process(audio, chosen_out_track):
|
100 |
gr.Info("Cleaning your audio sample...")
|
|
|
56 |
return audio_in
|
57 |
|
58 |
def load_hidden_mic(audio_in):
|
59 |
+
print("USER RECORDED A NEW SAMPLE")
|
60 |
|
61 |
library_path = 'bark_voices'
|
62 |
folder_name = 'audio-0-100'
|
|
|
65 |
folder_path = os.path.join(library_path, folder_name)
|
66 |
second_folder_path = os.path.join(library_path, second_folder_name)
|
67 |
|
68 |
+
print("We need to clean previous util files, if needed:")
|
69 |
if os.path.exists(folder_path):
|
70 |
try:
|
71 |
shutil.rmtree(folder_path)
|
72 |
+
print(f"Successfully deleted the folder previously created from last raw recorded sample: {folder_path}")
|
73 |
except OSError as e:
|
74 |
print(f"Error: {folder_path} - {e.strerror}")
|
75 |
else:
|
76 |
+
print(f"OK, the folder a raw recorded sample does not exist: {folder_path}")
|
77 |
|
78 |
if os.path.exists(second_folder_path):
|
79 |
try:
|
80 |
shutil.rmtree(second_folder_path)
|
81 |
+
print(f"Successfully deleted the folder previously created from last cleaned recorded sample: {second_folder_path}")
|
82 |
except OSError as e:
|
83 |
print(f"Error: {second_folder_path} - {e.strerror}")
|
84 |
else:
|
85 |
+
print(f"Ok, the folderfor a cleaned recorded sample does not exist: {second_folder_path}")
|
86 |
|
87 |
return audio_in
|
88 |
|
|
|
90 |
return False
|
91 |
|
92 |
def wipe_npz_file(folder_path):
|
93 |
+
print(f"We have to wipe previous .npz files, inf {folder_path} if needed")
|
94 |
if os.path.exists(folder_path):
|
95 |
+
print(f"folder {folder_path} exists")
|
96 |
#shutil.rmtree(folder_path)
|
|
|
97 |
else :
|
98 |
+
print(f"path: {folder_path} does not exists yet")
|
99 |
+
|
100 |
+
print("YO • user is manipulating audio inputs")
|
101 |
|
102 |
def split_process(audio, chosen_out_track):
|
103 |
gr.Info("Cleaning your audio sample...")
|