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

Function extract_audio

tests/vibevoice/vibevoice_python_warm_bench.py:230–237  ·  view source on GitHub ↗
(outputs: Any, index: int = 0)

Source from the content-addressed store, hash-verified

228
229
230def extract_audio(outputs: Any, index: int = 0) -> np.ndarray:
231 speech_outputs = getattr(outputs, "speech_outputs", None)
232 if not speech_outputs or index >= len(speech_outputs) or speech_outputs[index] is None:
233 raise RuntimeError("VibeVoice warmbench received no speech output")
234 audio = speech_outputs[index]
235 if torch.is_tensor(audio):
236 audio = audio.detach().cpu().float().numpy()
237 return np.asarray(audio, dtype=np.float32).reshape(-1)
238
239
240def patch_transformers_cache_signature(model: Any) -> None:

Callers 2

run_onceFunction · 0.85
run_batchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected