Added docs and typing in function declarations
This commit is contained in:
6 files changed
+68
-15
No files matched your search
+11
-6
@@ -1,12 +1,17 @@
|
||||
import re
|
||||
|
||||
|
||||
def sanitize_text(text):
|
||||
"""
|
||||
Sanitizes the text for tts.
|
||||
What gets removed:
|
||||
- following characters`^_~@!&;#:-%“”‘"%*/{}[]()\|<>?=+`
|
||||
- any http or https links
|
||||
def sanitize_text(text: str) -> str:
|
||||
"""Sanitizes the text for tts.
|
||||
What gets removed:
|
||||
- following characters`^_~@!&;#:-%“”‘"%*/{}[]()\|<>?=+`
|
||||
- any http or https links
|
||||
|
||||
Args:
|
||||
text (str): Text to be sanitized
|
||||
|
||||
Returns:
|
||||
str: Sanitized text
|
||||
"""
|
||||
|
||||
# remove any urls from the text
|
||||
|
||||
Reference in new issue
Block a user