diff --git a/modules/core/spk/TTSSpeaker.py b/modules/core/spk/TTSSpeaker.py index bf92303..25f387d 100644 --- a/modules/core/spk/TTSSpeaker.py +++ b/modules/core/spk/TTSSpeaker.py @@ -135,7 +135,7 @@ def from_token(model_id: str, tokens: list) -> "TTSSpeaker": @staticmethod def from_ref_wav(ref_wav: tuple[int, np.ndarray], text="") -> "TTSSpeaker": sr, data = ref_wav - assert data.dtype != np.int16, "ref wav must be int16" + assert data.dtype == np.int16, f"ref wav must be int16, but got {data.dtype}" spk = TTSSpeaker.empty() spk.add_ref(ref=DcSpkReference(text=text, wav=data.tobytes(), wav_sr=sr))