marigold334 commited on
Commit
cd9a4b8
1 Parent(s): 620ca40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -72,12 +72,9 @@ def centered_text(input_text, mode = "h1",):
72
  def generate_voice(input_text):
73
  # TTS Inference
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
 
 
72
  def generate_voice(input_text):
73
  # TTS Inference
74
  voice = st.session_state.TTS.inference(input_text)
 
 
 
75
 
76
  # Play audio
77
+ st.audio(voice,sample_rate = 22050)
78
  os.remove(f"cache_sound/new_generated.wav")
79
  st.caption("Generated Voice")
80