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

Function load_audio

tests/stable_audio/stable_audio_python_warm_bench.py:295–297  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

293
294
295def load_audio(path: Path) -> tuple[int, torch.Tensor]:
296 waveform, sample_rate = torchaudio.load(str(path))
297 return sample_rate, waveform
298
299
300def save_batch_audio(audio: torch.Tensor, output_dir: Path, sample_rate: int) -> list[dict[str, Any]]:

Callers 3

runFunction · 0.85
run_requestFunction · 0.85
load_request_audioFunction · 0.85

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected