Update tts.py

This commit is contained in:
Saifeddine ALOUI 2024-06-03 08:56:54 +02:00 committed by GitHub
parent 70f91d5168
commit 6e2e1a22ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,6 +38,7 @@ class LollmsTTS:
def __init__(
self,
name:str,
app: LollmsApplication,
model="",
voice="",
@ -54,6 +55,7 @@ class LollmsTTS:
api_key (str, optional): API key for accessing external TTS services. Defaults to an empty string.
output_path (Path or str, optional): Path where the output audio files will be saved. Defaults to None.
"""
self.name = name
self.ready = False
self.app = app
self.model = model
@ -161,4 +163,4 @@ class LollmsTTS:
# Remove any remaining code-like patterns (this can be adjusted as needed)
text = re.sub(r'[\{\}\[\]\(\)<>]', '', text)
text = text.replace("\\","")
return text
return text