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

Function normalize_for_cer

src/models/miotts/session.cpp:511–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511std::vector<uint32_t> normalize_for_cer(const std::string & text) {
512 std::vector<uint32_t> out;
513 for (const uint32_t cp : utf8_codepoints(lowercase_ascii(text), "MioTTS best_of_n ASR text")) {
514 if ((cp <= 0x7FU && std::isalnum(static_cast<unsigned char>(cp)) != 0) || is_japanese_codepoint(cp)) {
515 out.push_back(cp);
516 }
517 }
518 return out;
519}
520
521template <typename T>
522int64_t edit_distance(const std::vector<T> & ref, const std::vector<T> & hyp) {

Callers 1

asr_errorFunction · 0.85

Calls 3

is_japanese_codepointFunction · 0.85
utf8_codepointsFunction · 0.70
lowercase_asciiFunction · 0.70

Tested by

no test coverage detected