Skip to content

Commit

Permalink
🐛 fix TTSSpeaker.from_ref_wav
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzLuke96 committed Oct 10, 2024
1 parent 48e38dc commit 2885667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/core/spk/TTSSpeaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 2885667

Please sign in to comment.