From 218c4c723c8e7d5ae2e02788b4d5ead832951bcb Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Mon, 2 Sep 2024 18:53:30 +0800 Subject: [PATCH] fix re sub bug (#2199) ### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/llm/tts_model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rag/llm/tts_model.py b/rag/llm/tts_model.py index 3ae170ee8e..c477313a90 100644 --- a/rag/llm/tts_model.py +++ b/rag/llm/tts_model.py @@ -53,9 +53,10 @@ def __init__(self, key, model_name, base_url): def tts(self, audio): pass - def normalize_text(text): + def normalize_text(self, text): return re.sub(r'(\*\*|##\d+\$\$|#)', '', text) + class FishAudioTTS(Base): def __init__(self, key, model_name, base_url="https://api.fish.audio/v1/tts"): if not base_url: