| 82 | } |
| 83 | |
| 84 | std::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 | |
| 99 | engine::runtime::AudioBuffer read_audio_buffer(const std::string & path_text) { |
| 100 | const auto wav = engine::audio::read_wav_f32(resolve_path(path_text)); |
no test coverage detected