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

Function write_words_result

app/workflow/workflow.cpp:546–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544 throw std::runtime_error("workflow model step requested text_out but produced no text: " + id);
545 }
546 if (!path.parent_path().empty()) {
547 std::filesystem::create_directories(path.parent_path());
548 }
549 std::ofstream out(path);
550 out << result.text_output->text << "\n";
551 std::cout << "text_out=" << path.string() << "\n";
552}
553
554void write_words_result(
555 const engine::runtime::TaskResult & result,
556 const std::filesystem::path & path,
557 const std::string & id) {
558 if (result.word_timestamps.empty()) {
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());

Callers 2

run_model_step_implFunction · 0.85
run_model_step_foreachFunction · 0.85

Calls 2

word_timestamps_to_jsonFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected