[VITS] Only trigger tokenizer warning for uroman (#25915)

This commit is contained in:
Sanchit Gandhi 2023-09-01 19:27:01 +01:00 committed by GitHub
parent 1fa2d89a9b
commit 3587769c08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,7 +184,7 @@ class VitsTokenizer(PreTrainedTokenizer):
filtered_text = self._preprocess_char(text)
if has_non_roman_characters(filtered_text):
if has_non_roman_characters(filtered_text) and self.is_uroman:
logger.warning(
"Text to the tokenizer contains non-Roman characters. Ensure the `uroman` Romanizer is "
"applied to the text prior to passing it to the tokenizer. See "