Add address sanitizer and undefined behavior sanitizer (#951)
This commit is contained in:
@@ -96,7 +96,7 @@ OfflineTtsCharacterFrontend::OfflineTtsCharacterFrontend(
|
||||
|
||||
std::vector<std::vector<int64_t>>
|
||||
OfflineTtsCharacterFrontend::ConvertTextToTokenIds(
|
||||
const std::string &_text, const std::string &voice /*= ""*/) const {
|
||||
const std::string &_text, const std::string & /*voice = ""*/) const {
|
||||
// see
|
||||
// https://github.com/coqui-ai/TTS/blob/dev/TTS/tts/utils/text/tokenizer.py#L87
|
||||
int32_t use_eos_bos = meta_data_.use_eos_bos;
|
||||
@@ -151,7 +151,7 @@ OfflineTtsCharacterFrontend::ConvertTextToTokenIds(
|
||||
this_sentence.push_back(eos_id);
|
||||
}
|
||||
|
||||
if (this_sentence.size() > 1 + use_eos_bos) {
|
||||
if (static_cast<int32_t>(this_sentence.size()) > 1 + use_eos_bos) {
|
||||
ans.push_back(std::move(this_sentence));
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user