Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/chatterbox/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import librosa
import torch
import perth
import torch.nn.functional as F
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
Expand Down Expand Up @@ -123,7 +122,6 @@ def __init__(
self.tokenizer = tokenizer
self.device = device
self.conds = conds
self.watermarker = perth.PerthImplicitWatermarker()

@classmethod
def from_local(cls, ckpt_dir, device) -> 'ChatterboxTTS':
Expand Down Expand Up @@ -262,5 +260,4 @@ def generate(
ref_dict=self.conds.gen,
)
wav = wav.squeeze(0).detach().cpu().numpy()
watermarked_wav = self.watermarker.apply_watermark(wav, sample_rate=self.sr)
return torch.from_numpy(watermarked_wav).unsqueeze(0)
return torch.from_numpy(wav).unsqueeze(0)
5 changes: 1 addition & 4 deletions src/chatterbox/vc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import librosa
import torch
import perth
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file

Expand All @@ -26,7 +25,6 @@ def __init__(
self.sr = S3GEN_SR
self.s3gen = s3gen
self.device = device
self.watermarker = perth.PerthImplicitWatermarker()
if ref_dict is None:
self.ref_dict = None
else:
Expand Down Expand Up @@ -100,5 +98,4 @@ def generate(
ref_dict=self.ref_dict,
)
wav = wav.squeeze(0).detach().cpu().numpy()
watermarked_wav = self.watermarker.apply_watermark(wav, sample_rate=self.sr)
return torch.from_numpy(watermarked_wav).unsqueeze(0)
return torch.from_numpy(wav).unsqueeze(0)