Update app.py
Browse files
app.py
CHANGED
@@ -50,9 +50,9 @@ if uploaded_file is not None:
|
|
50 |
|
51 |
# convert to wav
|
52 |
format_ = uploaded_file.name.split('.')[-1]
|
53 |
-
outputname = uploaded_file.name + ".
|
54 |
sound = AudioSegment.from_file(uploaded_file,format=format_)
|
55 |
-
sound.export(outputname, format="
|
56 |
|
57 |
st.title("Audio2Many")
|
58 |
st.write('δΈε
±ζ', round(length_audio, 2) , "ει")
|
@@ -65,7 +65,7 @@ if __name__ == "__main__":
|
|
65 |
if submit_button:
|
66 |
|
67 |
# remove files
|
68 |
-
files = glob.glob('small/*.
|
69 |
for f in files:
|
70 |
try:
|
71 |
os.remove(f)
|
|
|
50 |
|
51 |
# convert to wav
|
52 |
format_ = uploaded_file.name.split('.')[-1]
|
53 |
+
outputname = uploaded_file.name + ".mp3"
|
54 |
sound = AudioSegment.from_file(uploaded_file,format=format_)
|
55 |
+
sound.export(outputname, format="mp3")
|
56 |
|
57 |
st.title("Audio2Many")
|
58 |
st.write('δΈε
±ζ', round(length_audio, 2) , "ει")
|
|
|
65 |
if submit_button:
|
66 |
|
67 |
# remove files
|
68 |
+
files = glob.glob('small/*.mp3')
|
69 |
for f in files:
|
70 |
try:
|
71 |
os.remove(f)
|