Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bobqianic authored Feb 5, 2024
1 parent a0d4348 commit b3305eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions whisper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_pair<std::string, bool>> whisper_utf8_merge_and_split(const std::string &str) {
std::vector<whisper_pair<std::string, bool>> result;
std::string buffer;
Expand Down Expand Up @@ -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);
}

// =================================================================================================

//
Expand Down

0 comments on commit b3305eb

Please sign in to comment.