Spaces:
Build error
Build error
pustozerov
commited on
Commit
·
26cb077
1
Parent(s):
e8d85a3
Updated paths for user data.
Browse files- .gitignore +1 -1
- app.py +3 -2
.gitignore
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
/data/user_data/
|
2 |
/data/database/
|
3 |
/info/configs/manifests/
|
4 |
-
/info/transcripts/
|
|
|
1 |
/data/user_data/
|
2 |
/data/database/
|
3 |
/info/configs/manifests/
|
4 |
+
/info/transcripts/
|
app.py
CHANGED
@@ -49,9 +49,10 @@ uploaded_file = st.file_uploader("Choose your recording with a speech",
|
|
49 |
accept_multiple_files=False, type=["mp3", "wav", "ogg"])
|
50 |
if uploaded_file is not None:
|
51 |
os.makedirs(FOLDER_USER_DATA, exist_ok=True)
|
52 |
-
|
|
|
53 |
sound = AudioSegment.from_mp3(uploaded_file)
|
54 |
-
elif ".ogg" in uploaded_file:
|
55 |
sound = AudioSegment.from_ogg(uploaded_file)
|
56 |
else:
|
57 |
sound = AudioSegment.from_wav(uploaded_file)
|
|
|
49 |
accept_multiple_files=False, type=["mp3", "wav", "ogg"])
|
50 |
if uploaded_file is not None:
|
51 |
os.makedirs(FOLDER_USER_DATA, exist_ok=True)
|
52 |
+
print(uploaded_file)
|
53 |
+
if ".mp3" in uploaded_file.name:
|
54 |
sound = AudioSegment.from_mp3(uploaded_file)
|
55 |
+
elif ".ogg" in uploaded_file.name:
|
56 |
sound = AudioSegment.from_ogg(uploaded_file)
|
57 |
else:
|
58 |
sound = AudioSegment.from_wav(uploaded_file)
|