Skip to content

SOTA Open Source TTS

fix the bug where non-english speech will always prepend sentences with 'speak' (#652)

cocktailpeanutec2c5b70fba1
diff --git a/tools/llama/generate.py b/tools/llama/generate.py
index a43d9a4..e2beba9 100644
--- a/tools/llama/generate.py
+++ b/tools/llama/generate.py
@@ -602,7 +602,7 @@ def encode_tokens(
num_codebooks=4,
):
string = clean_text(string)
- string = f"<|im_start|>user\nSpeak: {string}<|im_end|><|im_start|>assistant\n"
+ string = f"<|im_start|>user\n{string}<|im_end|><|im_start|>assistant\n"
new_tokens = tokenizer.encode(
string,