marigold334 commited on
Commit
620ca40
1 Parent(s): 4936e8e
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -74,11 +74,11 @@ def generate_voice(input_text):
74
  voice = st.session_state.TTS.inference(input_text)
75
 
76
  # Save audio (bug in Streamlit, can't play numpy array directly)
77
- sf.write(f"cache_sound/{input_text}.wav", voice, 22050)
78
 
79
  # Play audio
80
- st.audio(f"cache_sound/{input_text}.wav", format = "audio/wav")
81
- os.remove(f"cache_sound/{input_text}.wav")
82
  st.caption("Generated Voice")
83
 
84
 
 
74
  voice = st.session_state.TTS.inference(input_text)
75
 
76
  # Save audio (bug in Streamlit, can't play numpy array directly)
77
+ sf.write(f"cache_sound/new_generated.wav", voice, 22050)
78
 
79
  # Play audio
80
+ st.audio(f"cache_sound/new_generated.wav", format = "audio/wav")
81
+ os.remove(f"cache_sound/new_generated.wav")
82
  st.caption("Generated Voice")
83
 
84