djkesu commited on
Commit
9dc043d
·
1 Parent(s): b6d22f3

updated app

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import os
2
  import shutil
3
- from pathlib import Path
4
  import streamlit as st
5
  import torchaudio
6
  import IPython
@@ -82,9 +81,11 @@ if st.button("Generate Speech"):
82
  # Save and display the generated audio
83
  output_path = os.path.join(OUTPUT_FOLDER, "generated.wav")
84
  torchaudio.save(output_path, gen.squeeze(0).cpu(), 24000)
85
- st.audio(output_path, format="audio/wav")
86
 
87
- # Show generated output
 
 
 
88
  st.subheader("Generated Output")
89
  st.audio(output_path, format="audio/wav")
90
  if st.checkbox("Play Audio"):
 
1
  import os
2
  import shutil
 
3
  import streamlit as st
4
  import torchaudio
5
  import IPython
 
81
  # Save and display the generated audio
82
  output_path = os.path.join(OUTPUT_FOLDER, "generated.wav")
83
  torchaudio.save(output_path, gen.squeeze(0).cpu(), 24000)
 
84
 
85
+ # Log the path of the generated audio
86
+ st.write(f"Generated audio saved at: {output_path}")
87
+
88
+ # Display the generated audio
89
  st.subheader("Generated Output")
90
  st.audio(output_path, format="audio/wav")
91
  if st.checkbox("Play Audio"):