From 0894b32cd345ba94d4413b784a9ebcd17d699a7f Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Sat, 1 Jul 2023 00:08:33 +0400 Subject: [PATCH] Fix enhancer usage Signed-off-by: Vladimir Bataev --- nemo/collections/asr/models/hybrid_asr_tts_models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nemo/collections/asr/models/hybrid_asr_tts_models.py b/nemo/collections/asr/models/hybrid_asr_tts_models.py index 8486f956c3b7..8494a093b29d 100644 --- a/nemo/collections/asr/models/hybrid_asr_tts_models.py +++ b/nemo/collections/asr/models/hybrid_asr_tts_models.py @@ -311,8 +311,10 @@ def from_pretrained_models( ) ) else: + cfg = copy.deepcopy(cfg) # copy to avoid modifying original config cfg.tts_model_path = f"{tts_model_path}" cfg.asr_model_path = f"{asr_model_path}" + cfg.enhancer_model_path = f"{enhancer_model_path}" if enhancer_model_path is not None else None return ASRWithTTSModel(cfg, trainer=trainer) def __setattr__(self, name, value):