Skip to content

Commit

Permalink
feat(tokenizer): use encode_plus instead of __call__
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Jul 8, 2024
1 parent 2f07b8b commit aea84bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ChatTTS/model/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def encode(
max_attention_mask_len = -1
# avoid random speaker embedding of tokenizer in the other dims
for t in text:
x = self._tokenizer(
x = self._tokenizer.encode_plus(
t, return_tensors="pt", add_special_tokens=False, padding=True
)
input_ids_lst.append(x["input_ids"].squeeze_(0))
Expand Down

0 comments on commit aea84bf

Please sign in to comment.