Refresh model card and examples
This commit is contained in:
+2
-2
@@ -45,7 +45,7 @@ def load_acoustic(path: Path, device: torch.device) -> tuple[MicroFastSpeech, di
|
||||
model.load_state_dict(ckpt["model"])
|
||||
model.eval()
|
||||
params = int(ckpt.get("params") or sum(p.numel() for p in model.parameters()))
|
||||
return model, ckpt.get("speakers") or {"qwen3_mark": 0}, params
|
||||
return model, ckpt.get("speakers") or {"mark": 0}, params
|
||||
|
||||
|
||||
def load_vocoder(path: Path, device: torch.device) -> tuple[HifiGanGenerator, int]:
|
||||
@@ -91,7 +91,7 @@ def synthesize(
|
||||
phone = phone.unsqueeze(0).to(device)
|
||||
tone = tone.unsqueeze(0).to(device)
|
||||
lang = lang.unsqueeze(0).to(device)
|
||||
speaker = torch.LongTensor([int(speakers.get("qwen3_mark", 0))]).to(device)
|
||||
speaker = torch.LongTensor([int(speakers.get("mark", next(iter(speakers.values()), 0)))]).to(device)
|
||||
mel = acoustic.infer(
|
||||
phone,
|
||||
tone,
|
||||
|
||||
Reference in New Issue
Block a user