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

Function record_result_paths

app/workflow/workflow.cpp:505–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503 auto out = base;
504 if (value == nullptr || value->is_null()) {
505 return out;
506 }
507 for (const auto & [key, child] : value->as_object()) {
508 out[key] = expand_value(minitts::cli::json_option_string(child), context);
509 }
510 return out;
511}
512
513void record_result_paths(
514 const std::string & id,
515 const engine::runtime::TaskResult & result,
516 const std::optional<std::filesystem::path> & audio_out,
517 const std::optional<std::filesystem::path> & text_out,
518 const std::optional<std::filesystem::path> & words_out,
519 const std::filesystem::path & step_dir,
520 WorkflowContext & context) {
521 if (result.audio_output.has_value() && audio_out.has_value()) {
522 context.values[id + ".audio_path"] = audio_out->string();
523 }
524 for (const auto & output : result.named_audio_outputs) {
525 const auto path = step_dir / (output.id + ".wav");
526 context.values[id + "." + output.id + "_path"] = path.string();
527 }
528 if (result.text_output.has_value()) {
529 context.values[id + ".text"] = result.text_output->text;
530 }
531 if (text_out.has_value()) {
532 context.values[id + ".text_path"] = text_out->string();

Callers 2

run_model_step_implFunction · 0.85
run_model_step_foreachFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected