Spaces:
Running
on
Zero
Running
on
Zero
Update chatterbox/tts_turbo.py
Browse files- chatterbox/tts_turbo.py +9 -9
chatterbox/tts_turbo.py
CHANGED
|
@@ -129,6 +129,15 @@ class ChatterboxTurboTTS:
|
|
| 129 |
self.conds = conds
|
| 130 |
self.watermarker = perth.PerthImplicitWatermarker()
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
@classmethod
|
| 133 |
def from_local(cls, ckpt_dir, device) -> 'ChatterboxTurboTTS':
|
| 134 |
ckpt_dir = Path(ckpt_dir)
|
|
@@ -244,15 +253,6 @@ class ChatterboxTurboTTS:
|
|
| 244 |
emotion_adv=exaggeration * torch.ones(1, 1, 1),
|
| 245 |
).to(device=self.device)
|
| 246 |
self.conds = Conditionals(t3_cond, s3gen_ref_dict)
|
| 247 |
-
|
| 248 |
-
def to(self, device):
|
| 249 |
-
self.device = device
|
| 250 |
-
self.t3 = self.t3.to(device)
|
| 251 |
-
self.s3gen = self.s3gen.to(device)
|
| 252 |
-
self.ve = self.ve.to(device)
|
| 253 |
-
if self.conds is not None:
|
| 254 |
-
self.conds = self.conds.to(device)
|
| 255 |
-
return self
|
| 256 |
|
| 257 |
def generate(
|
| 258 |
self,
|
|
|
|
| 129 |
self.conds = conds
|
| 130 |
self.watermarker = perth.PerthImplicitWatermarker()
|
| 131 |
|
| 132 |
+
def to(self, device):
|
| 133 |
+
self.device = device
|
| 134 |
+
self.t3 = self.t3.to(device)
|
| 135 |
+
self.s3gen = self.s3gen.to(device)
|
| 136 |
+
self.ve = self.ve.to(device)
|
| 137 |
+
if self.conds is not None:
|
| 138 |
+
self.conds = self.conds.to(device)
|
| 139 |
+
return self
|
| 140 |
+
|
| 141 |
@classmethod
|
| 142 |
def from_local(cls, ckpt_dir, device) -> 'ChatterboxTurboTTS':
|
| 143 |
ckpt_dir = Path(ckpt_dir)
|
|
|
|
| 253 |
emotion_adv=exaggeration * torch.ones(1, 1, 1),
|
| 254 |
).to(device=self.device)
|
| 255 |
self.conds = Conditionals(t3_cond, s3gen_ref_dict)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
|
| 257 |
def generate(
|
| 258 |
self,
|