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

Method load

src/framework/runtime/registry.cpp:129–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127 const auto * loader = find_loader(request);
128 if (loader == nullptr) {
129 throw std::runtime_error("no registered model loader can load: " + request.model_path.string());
130 }
131 const auto inspection = engine::debug::trace_log_enabled()
132 ? std::optional<ModelInspection>(loader->inspect(request))
133 : std::nullopt;
134 auto model = loader->load(request);
135 if (inspection.has_value()) {
136 log_model_load_trace(*inspection, *model);
137 }
138 return model;
139}
140
141std::unique_ptr<ILoadedVoiceModel> ModelRegistry::load(const std::filesystem::path & model_path) const {
142 ModelLoadRequest request;
143 request.model_path = model_path;
144 return load(request);
145}
146

Callers 1

log_enabledFunction · 0.45

Calls 4

trace_log_enabledFunction · 0.85
log_model_load_traceFunction · 0.85
loadFunction · 0.85
inspectMethod · 0.45

Tested by

no test coverage detected