sss2000 commited on
Commit
0449dc4
1 Parent(s): 5438906

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -20,16 +20,15 @@ def translation(txt):
20
 
21
  # Main function
22
  def main():
23
-
24
  uploaded_file = st.file_uploader("Select an audio file", type=["mp3", "wav","m4a"])
25
-
26
  if uploaded_file is not None:
27
- audio_data = uploaded_file.read()
28
- st.audio(audio_data, format='audio/mp3/m4a')
29
 
30
  # Stage 1: Audio to Text
31
  st.text('Processing audio2txt...')
32
- txt = audio2txt(uploaded_file.name)
33
  st.write(txt)
34
 
35
  # Stage 2: Text to Translation
 
20
 
21
  # Main function
22
  def main():
 
23
  uploaded_file = st.file_uploader("Select an audio file", type=["mp3", "wav","m4a"])
24
+
25
  if uploaded_file is not None:
26
+ audio_data = uploaded_file.read()
27
+ st.audio(audio_data, format='audio/mp3/m4a')
28
 
29
  # Stage 1: Audio to Text
30
  st.text('Processing audio2txt...')
31
+ txt = audio2txt(audio_data)
32
  st.write(txt)
33
 
34
  # Stage 2: Text to Translation