(source_path: Path, target_path: Path)
| 191 | return waveform.to(device) |
| 192 | |
| 193 | def run_vc_once(source_path: Path, target_path: Path) -> tuple[np.ndarray, int, float]: |
| 194 | source = load_request_audio(source_path) |
| 195 | target = load_request_audio(target_path) |
| 196 | sync_device(args.backend, args.device) |
| 197 | started = time.perf_counter() |
| 198 | with torch.inference_mode(): |
| 199 | decoded = model.voice_conversion(source, target) |
| 200 | sync_device(args.backend, args.device) |
| 201 | wall_ms = (time.perf_counter() - started) * 1000.0 |
| 202 | return decoded.detach().cpu().float().numpy(), int(model.config.sample_rate), wall_ms |
| 203 | |
| 204 | timing_lines: list[str] = [] |
| 205 | json_requests = load_json_requests(args) |
no test coverage detected