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

Function speech_segments_json

tests/core/audio_task_warm_bench.h:124–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124inline io::json::Value speech_segments_json(const std::vector<runtime::SpeechSegment> & segments) {
125 io::json::Value::Array out;
126 out.reserve(segments.size());
127 for (const auto & segment : segments) {
128 out.push_back(io::json::Value::make_object({
129 {"start_sample", number(static_cast<double>(segment.span.start_sample))},
130 {"end_sample", number(static_cast<double>(segment.span.end_sample))},
131 {"confidence", number(segment.confidence)},
132 }));
133 }
134 return io::json::Value::make_array(std::move(out));
135}
136
137inline io::json::Value speaker_turns_json(const std::vector<runtime::SpeakerTurn> & turns) {
138 io::json::Value::Array out;

Callers 1

result_step_jsonFunction · 0.85

Calls 2

numberFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected