Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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=
|
| 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 |
-
|
| 48 |
-
|
| 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):
|