Skip to content

Commit

Permalink
fix: _encode_spk_emb use 'tobytes' without check 'dtype' (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
afpro authored Jun 27, 2024
1 parent 48bf2ac commit 753f5f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ChatTTS/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def sample_random_speaker(self) -> str:
@staticmethod
def _encode_spk_emb(spk_emb: torch.Tensor) -> str:
with torch.no_grad():
arr: np.ndarray = spk_emb.cpu().numpy()
arr: np.ndarray = spk_emb.to(dtype=torch.float16, device='cpu').numpy()
s = b14.encode_to_string(
lzma.compress(
arr.tobytes(),
Expand Down

0 comments on commit 753f5f1

Please sign in to comment.