diff --git a/sherpa-onnx/csrc/offline-recognizer-ctc-impl.h b/sherpa-onnx/csrc/offline-recognizer-ctc-impl.h index d0bbb8048..a4398d60d 100644 --- a/sherpa-onnx/csrc/offline-recognizer-ctc-impl.h +++ b/sherpa-onnx/csrc/offline-recognizer-ctc-impl.h @@ -43,7 +43,7 @@ static OfflineRecognitionResult Convert(const OfflineCtcDecoderResult &src, auto sym = sym_table[src.tokens[i]]; text.append(sym); - if (sym.size() == 1 and sym[0] != ' ') { + if (sym.size() == 1 && sym[0] != ' ') { // for byte bpe models std::ostringstream os; os << "<0x" << std::hex << std::uppercase << static_cast(sym[0]) diff --git a/sherpa-onnx/csrc/offline-recognizer-transducer-impl.h b/sherpa-onnx/csrc/offline-recognizer-transducer-impl.h index b1e47c17a..e51411764 100644 --- a/sherpa-onnx/csrc/offline-recognizer-transducer-impl.h +++ b/sherpa-onnx/csrc/offline-recognizer-transducer-impl.h @@ -44,7 +44,7 @@ static OfflineRecognitionResult Convert( auto sym = sym_table[i]; text.append(sym); - if (sym.size() == 1 and sym[0] != ' ') { + if (sym.size() == 1 && sym[0] != ' ') { // for byte bpe models std::ostringstream os; os << "<0x" << std::hex << std::uppercase << static_cast(sym[0]) diff --git a/sherpa-onnx/csrc/online-recognizer-ctc-impl.h b/sherpa-onnx/csrc/online-recognizer-ctc-impl.h index 81e8c1827..4c35e3889 100644 --- a/sherpa-onnx/csrc/online-recognizer-ctc-impl.h +++ b/sherpa-onnx/csrc/online-recognizer-ctc-impl.h @@ -36,7 +36,7 @@ static OnlineRecognizerResult Convert(const OnlineCtcDecoderResult &src, r.text.append(sym); - if (sym.size() == 1 and sym[0] != ' ') { + if (sym.size() == 1 && sym[0] != ' ') { // for byte bpe models std::ostringstream os; os << "<0x" << std::hex << std::uppercase << static_cast(sym[0]) diff --git a/sherpa-onnx/csrc/online-recognizer-transducer-impl.h b/sherpa-onnx/csrc/online-recognizer-transducer-impl.h index 16a95208a..9a0c68d00 100644 --- a/sherpa-onnx/csrc/online-recognizer-transducer-impl.h +++ b/sherpa-onnx/csrc/online-recognizer-transducer-impl.h @@ -48,7 +48,7 @@ static OnlineRecognizerResult Convert(const OnlineTransducerDecoderResult &src, r.text.append(sym); - if (sym.size() == 1 and sym[0] != ' ') { + if (sym.size() == 1 && sym[0] != ' ') { // for byte bpe models std::ostringstream os; os << "<0x" << std::hex << std::uppercase << static_cast(sym[0])