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

Function parse_step_backend

app/workflow/workflow.cpp:561–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559 throw std::runtime_error("workflow model step requested words_out but produced no word timestamps: " + id);
560 }
561 if (!path.parent_path().empty()) {
562 std::filesystem::create_directories(path.parent_path());
563 }
564 std::ofstream out(path);
565 out << word_timestamps_to_json(result.word_timestamps) << "\n";
566 std::cout << "words_out=" << path.string() << "\n";
567}
568
569engine::core::BackendConfig parse_step_backend(
570 const engine::io::json::Value & step,
571 engine::core::BackendConfig fallback) {
572 const auto backend = workflow_optional_string(step, "backend");
573 const auto impl = workflow_optional_string(step, "backend_impl");
574 const auto device = workflow_optional_number(step, "device");
575 const auto device_name = workflow_optional_string(step, "device_name");
576 if (device.has_value() && device_name.has_value()) {
577 throw std::runtime_error("workflow step cannot specify both device and device_name");
578 }
579 if (backend.has_value()) {
580 fallback.type = minitts::cli::parse_backend(*backend);

Callers 3

run_model_step_implFunction · 0.85
run_chunked_model_stepFunction · 0.85
run_model_step_foreachFunction · 0.85

Calls 3

workflow_optional_stringFunction · 0.85
workflow_optional_numberFunction · 0.85
parse_backendFunction · 0.50

Tested by

no test coverage detected