| 319 | if (!result.text_output.has_value()) { |
| 320 | throw std::runtime_error("--text-out was requested but the task result has no text output"); |
| 321 | } |
| 322 | if (!path.parent_path().empty()) { |
| 323 | std::filesystem::create_directories(path.parent_path()); |
| 324 | } |
| 325 | std::ofstream output(path); |
| 326 | if (!output) { |
| 327 | throw std::runtime_error("failed to open text output: " + path.string()); |
| 328 | } |
| 329 | output << result.text_output->text << "\n"; |
| 330 | std::cout << label << "=" << path.string() << "\n"; |
| 331 | } |
| 332 | |
| 333 | void print_task_help(const engine::runtime::ModelRegistry & registry, const std::string & task_name) { |
| 334 | const auto task = engine::runtime::parse_voice_task_kind(task_name); |
| 335 | std::cout |
no test coverage detected