| 33 | validate_roformer_weight_storage_type(storage_type); |
| 34 | return storage_type; |
| 35 | } |
| 36 | |
| 37 | runtime::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; |
no test coverage detected