Skip to content

Commit

Permalink
fix re sub bug (infiniflow#2199)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?



### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored Sep 2, 2024
1 parent ac94521 commit 218c4c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rag/llm/tts_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 218c4c7

Please sign in to comment.