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

Function checked_positive

src/models/roformer/session.cpp:35–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 validate_roformer_weight_storage_type(storage_type);
34 return storage_type;
35}
36
37runtime::AudioBuffer derive_instrumental(
38 const runtime::AudioBuffer & mixture,
39 const runtime::AudioBuffer & vocals) {
40 if (mixture.sample_rate != vocals.sample_rate || mixture.channels != vocals.channels || mixture.samples.size() != vocals.samples.size()) {
41 throw std::runtime_error("RoFormer residual derivation requires matching mixture and vocals buffers");
42 }
43 runtime::AudioBuffer out = mixture;

Callers 1

RoformerSessionMethod · 0.70

Calls 1

stringFunction · 0.50

Tested by

no test coverage detected