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

Function quote_json

app/workflow/file_sink.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace {
16
17std::string quote_json(const std::string & value) {
18 std::string out = "\"";
19 for (char ch : value) {
20 if (ch == '\\' || ch == '"') {
21 out.push_back('\\');
22 }
23 out.push_back(ch);
24 }
25 out.push_back('"');
26 return out;
27}
28
29std::string speech_segments_to_json(const std::vector<engine::runtime::SpeechSegment> & segments) {
30 std::ostringstream out;

Callers 4

speaker_turns_to_jsonFunction · 0.70
artifact_to_jsonFunction · 0.70
batch_manifest_to_jsonFunction · 0.70
word_timestamps_to_jsonFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected