Spaces:
Runtime error
Runtime error
fix: remove stems and viz
Browse files
app.py
CHANGED
@@ -53,8 +53,8 @@ def analyze(path):
|
|
53 |
result= allin1.analyze(
|
54 |
path,
|
55 |
out_dir='./struct',
|
56 |
-
multiprocess=False
|
57 |
-
keep_byproducts=True, # TODO: remove this
|
58 |
)
|
59 |
|
60 |
json_structure_output = None
|
@@ -63,11 +63,11 @@ def analyze(path):
|
|
63 |
json_structure_output = os.path.join(root, file_path)
|
64 |
print(json_structure_output)
|
65 |
|
66 |
-
fig = allin1.visualize(
|
67 |
-
|
68 |
-
|
69 |
-
)
|
70 |
-
fig.set_dpi(300)
|
71 |
|
72 |
#allin1.sonify(
|
73 |
# result,
|
@@ -80,25 +80,25 @@ def analyze(path):
|
|
80 |
end = time.time()
|
81 |
elapsed_time = end-start
|
82 |
|
83 |
-
# Get the base name of the file
|
84 |
-
file_name = os.path.basename(path)
|
85 |
|
86 |
-
# Remove the extension from the file name
|
87 |
-
file_name_without_extension = os.path.splitext(file_name)[0]
|
88 |
-
print(file_name_without_extension)
|
89 |
-
bass_path, drums_path, other_path, vocals_path = None, None, None, None
|
90 |
-
for root, dirs, files in os.walk(f"./demix/htdemucs/{file_name_without_extension}"):
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
#return result.bpm, fig, sonif_path, elapsed_time
|
104 |
return result.bpm, elapsed_time, json_structure_output
|
|
|
53 |
result= allin1.analyze(
|
54 |
path,
|
55 |
out_dir='./struct',
|
56 |
+
multiprocess=False
|
57 |
+
# keep_byproducts=True, # TODO: remove this
|
58 |
)
|
59 |
|
60 |
json_structure_output = None
|
|
|
63 |
json_structure_output = os.path.join(root, file_path)
|
64 |
print(json_structure_output)
|
65 |
|
66 |
+
# fig = allin1.visualize(
|
67 |
+
# result,
|
68 |
+
# multiprocess=False,
|
69 |
+
# )
|
70 |
+
# fig.set_dpi(300)
|
71 |
|
72 |
#allin1.sonify(
|
73 |
# result,
|
|
|
80 |
end = time.time()
|
81 |
elapsed_time = end-start
|
82 |
|
83 |
+
# # Get the base name of the file
|
84 |
+
# file_name = os.path.basename(path)
|
85 |
|
86 |
+
# # Remove the extension from the file name
|
87 |
+
# file_name_without_extension = os.path.splitext(file_name)[0]
|
88 |
+
# print(file_name_without_extension)
|
89 |
+
# bass_path, drums_path, other_path, vocals_path = None, None, None, None
|
90 |
+
# for root, dirs, files in os.walk(f"./demix/htdemucs/{file_name_without_extension}"):
|
91 |
+
# for file_path in files:
|
92 |
+
# file_path = os.path.join(root, file_path)
|
93 |
+
# print(file_path)
|
94 |
+
# if "bass.wav" in file_path:
|
95 |
+
# bass_path = file_path
|
96 |
+
# if "vocals.wav" in file_path:
|
97 |
+
# vocals_path = file_path
|
98 |
+
# if "other.wav" in file_path:
|
99 |
+
# other_path = file_path
|
100 |
+
# if "drums.wav" in file_path:
|
101 |
+
# drums_path = file_path
|
102 |
|
103 |
#return result.bpm, fig, sonif_path, elapsed_time
|
104 |
return result.bpm, elapsed_time, json_structure_output
|