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

Function parse_model_ref

src/models/demucs/assets.cpp:32–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31HTDemucsConfig parse_config(const assets::ResourceBundle & resources) {
32 const auto root = resources.parse_json("submodel_config");
33 HTDemucsConfig config;
34 config.class_name = json::require_string(root, "class_name");
35 if (config.class_name != "HTDemucs") {
36 throw std::runtime_error("Only HTDemucs class_name is supported, got: " + config.class_name);
37 }
38 config.signature = json::require_string(root, "signature");
39 config.checkpoint_file = json::require_string(root, "checkpoint_file");
40 config.sources = json::require_string_array(root, "sources");
41 config.audio_channels = json::require_i64(root, "audio_channels");
42 config.sample_rate = json::require_i64(root, "samplerate");
43 config.segment_seconds = json::require_f32(root, "segment");

Callers 1

parse_manifestFunction · 0.85

Calls 4

require_relative_pathFunction · 0.85
is_numberMethod · 0.80
as_i64Method · 0.80
findMethod · 0.45

Tested by

no test coverage detected