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

Function normalize_text

src/models/voxcpm2/tokenizer_text.cpp:61–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61std::string normalize_text(std::string_view text) {
62 const std::string space = "\xE2\x96\x81";
63 std::string out = space;
64 for (char ch : text) {
65 if (ch == ' ') {
66 out += space;
67 } else {
68 out.push_back(ch);
69 }
70 }
71 return out;
72}
73
74std::string byte_fallback_token(unsigned char byte) {
75 constexpr char kHex[] = "0123456789ABCDEF";

Callers 2

runFunction · 0.90
encodeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected