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

Function input_audio_duration_sec

tests/perf/model_perf.py:143–149  ·  view source on GitHub ↗
(request: dict[str, Any])

Source from the content-addressed store, hash-verified

141
142
143def input_audio_duration_sec(request: dict[str, Any]) -> float:
144 for key in ("audio", "source_audio"):
145 value = request.get(key)
146 if isinstance(value, str) and value:
147 samples, sample_rate = read_wav_mono_f32(Path(value))
148 return audio_duration_sec(samples, sample_rate)
149 return 0.0
150
151
152def load_perf_cases(path: Path) -> list[PerfCase]:

Callers 1

runFunction · 0.85

Calls 3

read_wav_mono_f32Function · 0.85
audio_duration_secFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected