ekwek commited on
Commit
744f1d7
·
verified ·
1 Parent(s): 6137274

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -30,7 +30,7 @@ def tts_stream(text, temperature, top_p, repetition_penalty, state):
30
  chunks = []
31
  stream = model.infer_stream(
32
  text,
33
- chunk_size=1,
34
  temperature=temperature,
35
  top_p=top_p,
36
  repetition_penalty=repetition_penalty,
@@ -43,9 +43,9 @@ def tts_stream(text, temperature, top_p, repetition_penalty, state):
43
  # stream partial audio
44
  yield (SAMPLE_RATE, audio_np), np.concatenate(chunks)
45
 
46
- if chunks:
47
- final_audio = np.concatenate(chunks)
48
- yield (SAMPLE_RATE, final_audio), final_audio
49
 
50
 
51
  def save_audio(state):
 
30
  chunks = []
31
  stream = model.infer_stream(
32
  text,
33
+ chunk_size=3,
34
  temperature=temperature,
35
  top_p=top_p,
36
  repetition_penalty=repetition_penalty,
 
43
  # stream partial audio
44
  yield (SAMPLE_RATE, audio_np), np.concatenate(chunks)
45
 
46
+ #if chunks:
47
+ # final_audio = np.concatenate(chunks)
48
+ # yield (SAMPLE_RATE, final_audio), final_audio
49
 
50
 
51
  def save_audio(state):