Fabio Grasso
commited on
Commit
·
89b971c
1
Parent(s):
59e5631
fix: disable libs
Browse files- app/main.py +24 -23
app/main.py
CHANGED
@@ -97,13 +97,14 @@ def run():
|
|
97 |
f.write(uploaded_file.getbuffer())
|
98 |
filename = uploaded_file.name
|
99 |
elif choice == "🎤 Record Audio":
|
100 |
-
wav_audio_data = st_audiorec()
|
101 |
-
if wav_audio_data is not None:
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
107 |
|
108 |
if filename is not None:
|
109 |
st.markdown("<hr>", unsafe_allow_html=True)
|
@@ -127,22 +128,22 @@ def run():
|
|
127 |
song = song[start_time*1000:end_time*1000]
|
128 |
song.export(in_path / filename, format=filename.split(".")[-1])
|
129 |
with st.spinner(f"Splitting source audio, it will take almost {round(tot_time*3.6)} seconds..."):
|
130 |
-
separator(
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
)
|
146 |
|
147 |
last_dir = ".".join(filename.split(".")[:-1])
|
148 |
for file in ["vocals.mp3", "drums.mp3", "bass.mp3", "other.mp3"]:
|
|
|
97 |
f.write(uploaded_file.getbuffer())
|
98 |
filename = uploaded_file.name
|
99 |
elif choice == "🎤 Record Audio":
|
100 |
+
# wav_audio_data = st_audiorec()
|
101 |
+
# if wav_audio_data is not None:
|
102 |
+
# if wav_audio_data != b'RIFF,\x00\x00\x00WAVEfmt \x10\x00\x00\x00\x01\x00\x02\x00\x80>\x00\x00\x00\xfa\x00\x00\x04\x00\x10\x00data\x00\x00\x00\x00':
|
103 |
+
# clean_folders()
|
104 |
+
# filename = "recording.wav"
|
105 |
+
# with open(in_path / filename, "wb") as f:
|
106 |
+
# f.write(wav_audio_data)
|
107 |
+
pass
|
108 |
|
109 |
if filename is not None:
|
110 |
st.markdown("<hr>", unsafe_allow_html=True)
|
|
|
128 |
song = song[start_time*1000:end_time*1000]
|
129 |
song.export(in_path / filename, format=filename.split(".")[-1])
|
130 |
with st.spinner(f"Splitting source audio, it will take almost {round(tot_time*3.6)} seconds..."):
|
131 |
+
# separator(
|
132 |
+
# tracks=[in_path / filename],
|
133 |
+
# out=out_path,
|
134 |
+
# model=model,
|
135 |
+
# device="cpu",
|
136 |
+
# shifts=1,
|
137 |
+
# overlap=0.5,
|
138 |
+
# stem=two_stems,
|
139 |
+
# int24=int24,
|
140 |
+
# float32=float32,
|
141 |
+
# clip_mode="rescale",
|
142 |
+
# mp3=mp3,
|
143 |
+
# mp3_bitrate=mp3_rate,
|
144 |
+
# jobs=os.cpu_count(),
|
145 |
+
# verbose=True,
|
146 |
+
# )
|
147 |
|
148 |
last_dir = ".".join(filename.split(".")[:-1])
|
149 |
for file in ["vocals.mp3", "drums.mp3", "bass.mp3", "other.mp3"]:
|