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

Function validate_feature_block

src/models/voxcpm2/generator.cpp:124–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 out.insert(out.end(), residual.begin(), residual.end());
123 return out;
124}
125
126void append_patch(std::vector<float> &features, const std::vector<float> &patch,
127 int64_t expected_size) {
128 if (static_cast<int64_t>(patch.size()) != expected_size) {
129 throw std::runtime_error("VoxCPM2 generated patch size mismatch");
130 }
131 features.insert(features.end(), patch.begin(), patch.end());
132}
133
134void validate_feature_block(const std::vector<float> &features, int64_t patches,
135 int64_t patch_elems, const char *label) {
136 if (patches < 0) {
137 throw std::runtime_error(std::string("VoxCPM2 ") + label +

Callers 1

Calls 2

stringFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected