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

Function required_string_array

tests/vibevoice/vibevoice_warm_bench.cpp:84–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84std::vector<std::string> required_string_array(const engine::io::json::Value & object, const std::string & key) {
85 const auto * value = object.find(key);
86 if (value == nullptr || !value->is_array()) {
87 throw std::runtime_error("VibeVoice warmbench request missing required array field: " + key);
88 }
89 std::vector<std::string> out;
90 for (const auto & item : value->as_array()) {
91 out.push_back(item.as_string());
92 }
93 if (out.empty()) {
94 throw std::runtime_error("VibeVoice warmbench request voice_samples must not be empty");
95 }
96 return out;
97}
98
99engine::runtime::AudioBuffer read_audio_buffer(const std::string & path_text) {
100 const auto wav = engine::audio::read_wav_f32(resolve_path(path_text));

Callers 2

make_requestFunction · 0.85
make_task_requestFunction · 0.85

Calls 3

is_arrayMethod · 0.80
findMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected