Skip to content

Commit

Permalink
refactor: Improve remove_leading_trailing_nonalpha function in transc…
Browse files Browse the repository at this point in the history
…ription-utils.cpp
  • Loading branch information
royshil committed Jun 10, 2024
1 parent 2f42c4f commit 7d6513d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/transcription-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <algorithm>
#include <vector>

#define is_lead_byte(c) (((c) & 0xe0) == 0xc0 || ((c) & 0xf0) == 0xe0 || ((c) & 0xf8) == 0xf0)
#define is_trail_byte(c) (((c) & 0xc0) == 0x80)
#define is_lead_byte(c) (((c)&0xe0) == 0xc0 || ((c)&0xf0) == 0xe0 || ((c)&0xf8) == 0xf0)
#define is_trail_byte(c) (((c)&0xc0) == 0x80)

inline int lead_byte_length(const uint8_t c)
{
Expand Down
2 changes: 1 addition & 1 deletion src/whisper-utils/silero-vad-onnx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

// #define __DEBUG_SPEECH_PROB___

timestamp_t::timestamp_t(int start_, int end_) : start(start_), end(end_) {};
timestamp_t::timestamp_t(int start_, int end_) : start(start_), end(end_){};

// assignment operator modifies object, therefore non-const
timestamp_t &timestamp_t::operator=(const timestamp_t &a)
Expand Down

0 comments on commit 7d6513d

Please sign in to comment.