Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import langcodes
|
|
3 |
from allosaurus.app import read_recognizer
|
4 |
|
5 |
|
6 |
-
def
|
7 |
st.write(dir(uploaded_file))
|
8 |
st.write(type(uploaded_file))
|
9 |
if ".wav" in uploaded_file:
|
@@ -40,13 +40,15 @@ if __name__ == "__main__":
|
|
40 |
|
41 |
|
42 |
if uploaded_file is not None:
|
43 |
-
|
44 |
|
45 |
|
46 |
# audio_bytes = audio_file.read()
|
47 |
st.audio(uploaded_file, format='audio/wav')
|
48 |
|
49 |
-
|
|
|
|
|
50 |
st.write(result)
|
51 |
|
52 |
|
|
|
3 |
from allosaurus.app import read_recognizer
|
4 |
|
5 |
|
6 |
+
def get_path_to_wav_format(uploaded_file):
|
7 |
st.write(dir(uploaded_file))
|
8 |
st.write(type(uploaded_file))
|
9 |
if ".wav" in uploaded_file:
|
|
|
40 |
|
41 |
|
42 |
if uploaded_file is not None:
|
43 |
+
|
44 |
|
45 |
|
46 |
# audio_bytes = audio_file.read()
|
47 |
st.audio(uploaded_file, format='audio/wav')
|
48 |
|
49 |
+
wav_file = get_path_to_wav_format(uploaded_file)
|
50 |
+
|
51 |
+
result = model.recognize(uploaded_file, langcode)
|
52 |
st.write(result)
|
53 |
|
54 |
|