J Z commited on
Update tts.py
Browse files
tts.py
CHANGED
|
@@ -210,7 +210,7 @@ def _build_prompt_tokens(text):
|
|
| 210 |
|
| 211 |
input_ids = torch.cat([ref_input, start, gen_text, gen_end], dim=1)
|
| 212 |
else:
|
| 213 |
-
# Named voice
|
| 214 |
prompt = f"tara: {text}"
|
| 215 |
tokens = _tokenizer(prompt, return_tensors="pt")
|
| 216 |
start = torch.tensor([[TOKEN_START_OF_HUMAN]], dtype=torch.int64)
|
|
|
|
| 210 |
|
| 211 |
input_ids = torch.cat([ref_input, start, gen_text, gen_end], dim=1)
|
| 212 |
else:
|
| 213 |
+
# Named voice format for finetuned model
|
| 214 |
prompt = f"tara: {text}"
|
| 215 |
tokens = _tokenizer(prompt, return_tensors="pt")
|
| 216 |
start = torch.tensor([[TOKEN_START_OF_HUMAN]], dtype=torch.int64)
|