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

Method load_models

app/server/runtime.cpp:402–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402std::string task_result_json(const engine::runtime::TaskResult & result, double wall_ms) {
403 if (result.audio_output.has_value()) {
404 return task_result_json_with_timing(result, timing_json(wall_ms, *result.audio_output));
405 }
406 if (result.named_audio_outputs.size() == 1) {
407 return task_result_json_with_timing(result, timing_json(wall_ms, result.named_audio_outputs.front().audio));
408 }
409 return task_result_json_with_timing(result, timing_json(wall_ms));
410}
411
412std::string streaming_task_result_json(
413 const engine::runtime::TaskResult & result,
414 const std::optional<double> & ttft_ms) {
415 return task_result_json_with_timing(result, ttft_timing_json(require_ttft_ms(ttft_ms)));
416}
417
418std::string stream_event_json(const engine::runtime::StreamEvent & event) {
419 std::ostringstream out;
420 out << "{";
421 bool first = true;
422 auto field = [&](const char * name) {
423 if (!first) {
424 out << ",";
425 }

Callers

nothing calls this directly

Calls 3

parse_voice_task_kindFunction · 0.85
parse_run_modeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected