mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-19 20:57:58 +00:00
Update tts.py
This commit is contained in:
parent
70f91d5168
commit
6e2e1a22ce
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user