diff --git a/TTS/TikTok.py b/TTS/TikTok.py index 2bcbd6d..3f6752e 100644 --- a/TTS/TikTok.py +++ b/TTS/TikTok.py @@ -147,7 +147,7 @@ class TikTok: class TikTokTTSException(Exception): - def __init__(self, code: int, message: str): + def __init__(self, code: int, message: str=""): self._code = code self._message = message @@ -162,6 +162,6 @@ class TikTokTTSException(Exception): return f"Code: {self._code}, reason: the speaker doesn't exist, message: {self._message}" if self._code == 5: - return f"You have to add session id in config to use titok TTS" + return "You have to add session id in config to use titok TTS" return f"Code: {self._message}, reason: unknown, message: {self._message}"