Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -195,17 +195,17 @@ def tts_streaming(text: str, voice: str = "af_heart", speed: float = 1.0, format
|
|
195 |
|
196 |
# For the first chunk, prepend 0; for later chunks, start with the previous chunk's last token.
|
197 |
if i == 0:
|
198 |
-
tokens_to_send = [0] + chunk_tokens
|
199 |
else:
|
200 |
# tokens_to_send = [prev_last_token] + [16] + [0] + chunk_tokens + [0]
|
201 |
-
token_to_send = [0] + chunk_tokens
|
202 |
|
203 |
# Save the last token of this chunk for the next iteration.
|
204 |
prev_last_token = chunk_tokens[-1]
|
205 |
|
206 |
# Prepare the model input (a batch of one sequence).
|
207 |
final_token = [tokens_to_send]
|
208 |
-
|
209 |
|
210 |
# Use the number of tokens to select the appropriate style vector.
|
211 |
style_index = len(chunk_tokens) + 2
|
|
|
195 |
|
196 |
# For the first chunk, prepend 0; for later chunks, start with the previous chunk's last token.
|
197 |
if i == 0:
|
198 |
+
tokens_to_send = [0] + chunk_tokens
|
199 |
else:
|
200 |
# tokens_to_send = [prev_last_token] + [16] + [0] + chunk_tokens + [0]
|
201 |
+
token_to_send = [0] + chunk_tokens
|
202 |
|
203 |
# Save the last token of this chunk for the next iteration.
|
204 |
prev_last_token = chunk_tokens[-1]
|
205 |
|
206 |
# Prepare the model input (a batch of one sequence).
|
207 |
final_token = [tokens_to_send]
|
208 |
+
print(final_token)
|
209 |
|
210 |
# Use the number of tokens to select the appropriate style vector.
|
211 |
style_index = len(chunk_tokens) + 2
|