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

Function validate_common_generation_options

src/models/seed_vc/session.cpp:301–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299float median_like_torch_1d(std::vector<float> values) {
300 if (values.empty()) {
301 throw std::runtime_error("Seed-VC V1 f0 adjustment requires voiced F0 values");
302 }
303 const size_t median_index = (values.size() - 1) / 2;
304 std::nth_element(values.begin(), values.begin() + static_cast<std::ptrdiff_t>(median_index), values.end());
305 return values[median_index];
306}
307
308std::vector<float> adjust_source_f0_like_python(
309 const std::vector<float> & source_f0,
310 const std::vector<float> & target_f0,
311 bool auto_f0_adjust,

Callers 2

parse_v2_configFunction · 0.85
parse_v1_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected