Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -30,8 +30,8 @@ phoneme_vocab = config['vocab']
|
|
30 |
# ------------------------------------------------------------------------------
|
31 |
# Download the model and voice files from Hugging Face Hub
|
32 |
# ------------------------------------------------------------------------------
|
33 |
-
model_repo = "onnx-community/Kokoro-82M-
|
34 |
-
model_name = "onnx/
|
35 |
voice_file_pattern = "*.bin"
|
36 |
local_dir = "."
|
37 |
snapshot_download(
|
@@ -198,7 +198,7 @@ def tts_streaming(text: str, voice: str = "af_heart", speed: float = 1.0, format
|
|
198 |
if i == 0:
|
199 |
tokens_to_send = [0] + chunk_tokens + [0]
|
200 |
else:
|
201 |
-
tokens_to_send = [prev_last_token] + [16] +
|
202 |
# token_to_send = [0] + chunk_tokens + [0]
|
203 |
|
204 |
# Save the last token of this chunk for the next iteration.
|
|
|
30 |
# ------------------------------------------------------------------------------
|
31 |
# Download the model and voice files from Hugging Face Hub
|
32 |
# ------------------------------------------------------------------------------
|
33 |
+
model_repo = "onnx-community/Kokoro-82M-ONNX"
|
34 |
+
model_name = "onnx/model_q4f16.onnx" # "onnx/model.onnx"
|
35 |
voice_file_pattern = "*.bin"
|
36 |
local_dir = "."
|
37 |
snapshot_download(
|
|
|
198 |
if i == 0:
|
199 |
tokens_to_send = [0] + chunk_tokens + [0]
|
200 |
else:
|
201 |
+
tokens_to_send = [prev_last_token] + [16] + chunk_tokens + [0]
|
202 |
# token_to_send = [0] + chunk_tokens + [0]
|
203 |
|
204 |
# Save the last token of this chunk for the next iteration.
|