chandralegend commited on
Commit
eb2c78c
·
1 Parent(s): 1748c64

added more samples

Browse files
assets/Pilot1.mp3 ADDED
Binary file (172 kB). View file
 
assets/Pilot2.mp3 ADDED
Binary file (370 kB). View file
 
pages/4_Trying Out(Guess the Phrase).py CHANGED
@@ -37,7 +37,7 @@ initialize_level()
37
  def step_page():
38
  st.header("Tryit Out")
39
 
40
- input_type = st.selectbox("Input Type", ["Upload", "Record", "Sample"], index=2)
41
  audio_file = None
42
  if input_type == "Upload":
43
  uploaded_file = st.file_uploader("Upload a file", type=["wav", "mp3", "flac"])
@@ -55,11 +55,18 @@ def step_page():
55
  )
56
  with open(audio_file, "wb") as f:
57
  f.write(audio_bytes)
58
- else:
59
  audio_file = "assets/sample1.flac"
 
 
 
 
60
 
61
  if audio_file:
62
- st.audio(audio_file, format="audio/flac")
 
 
 
63
 
64
  transcript = st.text_input("What did you hear?")
65
  if st.button("Check") and transcript:
 
37
  def step_page():
38
  st.header("Tryit Out")
39
 
40
+ input_type = st.selectbox("Input Type", ["Upload", "Record", "Sample", "Pilot 1", "Pilot 2"], index=2)
41
  audio_file = None
42
  if input_type == "Upload":
43
  uploaded_file = st.file_uploader("Upload a file", type=["wav", "mp3", "flac"])
 
55
  )
56
  with open(audio_file, "wb") as f:
57
  f.write(audio_bytes)
58
+ elif input_type == "Sample":
59
  audio_file = "assets/sample1.flac"
60
+ elif input_type == "Pilot 1":
61
+ audio_file = "assets/pilot1.mp3"
62
+ elif input_type == "Pilot 2":
63
+ audio_file = "assets/pilot2.mp3"
64
 
65
  if audio_file:
66
+ if audio_file.endswith(".flac"):
67
+ st.audio(audio_file, format="audio/flac")
68
+ elif audio_file.endswith(".mp3"):
69
+ st.audio(audio_file, format="audio/mp3")
70
 
71
  transcript = st.text_input("What did you hear?")
72
  if st.button("Check") and transcript:
utils/__pycache__/login.cpython-310.pyc CHANGED
Binary files a/utils/__pycache__/login.cpython-310.pyc and b/utils/__pycache__/login.cpython-310.pyc differ