Spaces:
Runtime error
Runtime error
trying .ogg
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def get_path_to_wav_format(uploaded_file, suppress_outputs=False):
|
|
32 |
|
33 |
if ".wav" in uploaded_file.name:
|
34 |
return Path(uploaded_file.name)
|
35 |
-
if ".mp3" in uploaded_file.name:
|
36 |
new_desired_path = actual_file_path.with_suffix(".wav")
|
37 |
encoding="PCM_S" # Prevent encoding errors. https://stackoverflow.com/questions/60352850/wave-error-unknown-format-3-arises-when-trying-to-convert-a-wav-file-into-text
|
38 |
bits_per_sample=16
|
@@ -100,6 +100,7 @@ if __name__ == "__main__":
|
|
100 |
uploaded_files = st.file_uploader("Choose a file", type=[
|
101 |
".wav",
|
102 |
".mp3",
|
|
|
103 |
],
|
104 |
accept_multiple_files=True,
|
105 |
)
|
|
|
32 |
|
33 |
if ".wav" in uploaded_file.name:
|
34 |
return Path(uploaded_file.name)
|
35 |
+
if ".mp3" in uploaded_file.name or ".ogg" in uploaded_file.name:
|
36 |
new_desired_path = actual_file_path.with_suffix(".wav")
|
37 |
encoding="PCM_S" # Prevent encoding errors. https://stackoverflow.com/questions/60352850/wave-error-unknown-format-3-arises-when-trying-to-convert-a-wav-file-into-text
|
38 |
bits_per_sample=16
|
|
|
100 |
uploaded_files = st.file_uploader("Choose a file", type=[
|
101 |
".wav",
|
102 |
".mp3",
|
103 |
+
".ogg",
|
104 |
],
|
105 |
accept_multiple_files=True,
|
106 |
)
|