From 1391e703e41185d4816957eab8821bd77b377653 Mon Sep 17 00:00:00 2001 From: matteolippi Date: Tue, 4 Nov 2025 12:54:23 +0100 Subject: [PATCH] Fix MagpieTTS process_text: str.replace() doesn't modify in-place Signed-off-by: matteolippi --- nemo/collections/tts/models/magpietts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nemo/collections/tts/models/magpietts.py b/nemo/collections/tts/models/magpietts.py index 9f0ae9c45d5f..3c6085a7c87f 100644 --- a/nemo/collections/tts/models/magpietts.py +++ b/nemo/collections/tts/models/magpietts.py @@ -1111,8 +1111,8 @@ def process_text(self, input_text): single_space_text = single_space_text.translate(str.maketrans('', '', string.punctuation)) # @shehzeen: Added this to handle some common errors in ASR transcripts - single_space_text.replace("h t t p", "http") - single_space_text.replace("w w w", "www") + single_space_text = single_space_text.replace("h t t p", "http") + single_space_text = single_space_text.replace("w w w", "www") return single_space_text