diff --git a/whisper.cpp b/whisper.cpp index ac31b792d20..54197e47f48 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -4633,11 +4633,6 @@ static bool whisper_utf8_is_valid(const std::string &str) { return count == 0; // Ensure all UTF-8 characters are complete } -static bool whisper_utf8_is_valid(const char * str) { - std::string new_str(str); - return whisper_utf8_is_valid(new_str); -} - static std::vector> whisper_utf8_merge_and_split(const std::string &str) { std::vector> result; std::string buffer; @@ -6354,6 +6349,11 @@ float whisper_full_get_token_p(struct whisper_context * ctx, int i_segment, int return ctx->state->result_all[i_segment].tokens[i_token].p; } +bool whisper_utf8_is_valid(const char * str) { + std::string new_str(str); + return whisper_utf8_is_valid(new_str); +} + // ================================================================================================= //