Zw07 commited on
Commit
41db4ae
·
verified ·
1 Parent(s): 56588b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,9 +58,9 @@ def main():
58
  tmp_input_audio_file = os.path.join("/tmp/", audio_file.name)
59
  with open(tmp_input_audio_file, "wb") as f:
60
  f.write(audio_file.getbuffer())
61
-
 
62
  wav, sample_rate = torchaudio.load(tmp_input_audio_file)
63
-
64
  st.markdown("SR")
65
  st.markdown(sample_rate)
66
  # 展示文件到页面上
 
58
  tmp_input_audio_file = os.path.join("/tmp/", audio_file.name)
59
  with open(tmp_input_audio_file, "wb") as f:
60
  f.write(audio_file.getbuffer())
61
+ st.audio(tmp_input_audio_file, format="audio/wav")
62
+
63
  wav, sample_rate = torchaudio.load(tmp_input_audio_file)
 
64
  st.markdown("SR")
65
  st.markdown(sample_rate)
66
  # 展示文件到页面上