MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / run_vc_once

Function run_vc_once

tests/miocodec/miocodec_python_warm_bench.py:193–202  ·  view source on GitHub ↗
(source_path: Path, target_path: Path)

Source from the content-addressed store, hash-verified

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)

Callers 1

mainFunction · 0.85

Calls 2

load_request_audioFunction · 0.85
sync_deviceFunction · 0.70

Tested by

no test coverage detected