fix re sub bug (#2199)

### What problem does this PR solve?



### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2024-09-02 18:53:30 +08:00 committed by GitHub
parent 1d2c081710
commit b10eb8d085
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,9 +53,10 @@ class Base(ABC):
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: