In ctcdecode/src/binding.cpp change: `const char* end = str_i + strlen(labels)-1;` to `const char* end = str_i + strlen(labels);` I'd submit a patch, but I'm not 100% sure about the utf-8 stuff and how this is supposed to behave.