Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -208,7 +208,8 @@ def tts_streaming(text: str, voice: str = "af_heart", speed: float = 1.0, format
|
|
208 |
final_token = [[0, *chunk_tokens, 0]]
|
209 |
|
210 |
# Use the number of tokens to select the appropriate style vector.
|
211 |
-
style_index = len(
|
|
|
212 |
if style_index >= len(voices):
|
213 |
style_index = len(voices) - 1 # Fallback if index is out-of-bounds.
|
214 |
ref_s = voices[style_index]
|
|
|
208 |
final_token = [[0, *chunk_tokens, 0]]
|
209 |
|
210 |
# Use the number of tokens to select the appropriate style vector.
|
211 |
+
style_index = len(final_token)
|
212 |
+
print(len(voices))
|
213 |
if style_index >= len(voices):
|
214 |
style_index = len(voices) - 1 # Fallback if index is out-of-bounds.
|
215 |
ref_s = voices[style_index]
|