Skip to content

Commit 2ef720b

Browse files
authored
warning regardless of verbose flag (#107)
* warning Signed-off-by: Nikolay Karpov <karpnv@gmail.com> * self.verbose Signed-off-by: Nikolay Karpov <karpnv@gmail.com> --------- Signed-off-by: Nikolay Karpov <karpnv@gmail.com>
1 parent 80d2dcb commit 2ef720b

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

nemo_text_processing/text_normalization/normalize.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,7 @@ def normalize(
357357
return text
358358
output += ' ' + Normalizer.select_verbalizer(verbalizer_lattice)
359359
except Exception as e:
360-
if verbose:
361-
logger.warning("Failed text: " + text + str(e))
360+
logger.warning("Failed text: " + text + str(e))
362361
return text
363362
output = SPACE_DUP.sub(' ', output[1:])
364363

nemo_text_processing/text_normalization/normalize_with_audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def normalize_non_deterministic(
202202
text = pre_process(text) # to handle []
203203
text = text.strip()
204204
if not text:
205-
if self.verbose:
205+
if verbose:
206206
logger.info(text)
207207
return text
208208

0 commit comments

Comments
 (0)