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

Function run

tests/perf/model_perf.py:545–556  ·  view source on GitHub ↗
(request: dict[str, Any], _args: argparse.Namespace)

Source from the content-addressed store, hash-verified

543 )
544
545 def run(request: dict[str, Any], _args: argparse.Namespace) -> tuple[float, float]:
546 started = time.perf_counter()
547 model.transcribe(
548 audio=request["audio"],
549 context=request.get("context", ""),
550 language=request.get("language") or None,
551 return_time_stamps=False,
552 )
553 if args.backend == "cuda":
554 torch.cuda.synchronize(args.device)
555 wall_ms = (time.perf_counter() - started) * 1000.0
556 return wall_ms, input_audio_duration_sec(request)
557
558 return model, run
559

Callers 3

inferMethod · 0.85
measure_coldFunction · 0.85
measure_warmFunction · 0.85

Calls 14

normalize_textFunction · 0.90
input_audio_duration_secFunction · 0.85
GenerationConfigClass · 0.85
load_audioFunction · 0.85
read_wav_mono_f32Function · 0.85
apply_chat_templateMethod · 0.80
audio_duration_secFunction · 0.70
transcribeMethod · 0.45
getMethod · 0.45
generateMethod · 0.45
decodeMethod · 0.45
synthesizeMethod · 0.45

Tested by

no test coverage detected