36 lines
759 B
Python
36 lines
759 B
Python
from config import settings
|
|
|
|
|
|
class TTSConfig:
|
|
|
|
|
|
@staticmethod
|
|
def get_request_timeout():
|
|
|
|
return getattr(settings, "tts_request_timeout", 3)
|
|
|
|
@staticmethod
|
|
def get_llm_first_token_timeout():
|
|
|
|
return getattr(settings, "llm_first_token_timeout", 5)
|
|
|
|
@staticmethod
|
|
def get_max_tts_errors():
|
|
|
|
return 3
|
|
|
|
@staticmethod
|
|
def get_tts_audio_expiry():
|
|
|
|
return getattr(settings, "tts_audio_expiry", 3600)
|
|
|
|
@staticmethod
|
|
def get_max_storage_mb():
|
|
|
|
return getattr(settings, "max_tts_storage_mb", 500)
|
|
|
|
@staticmethod
|
|
def get_audio_url_base():
|
|
|
|
return f"http://{settings.server_host}:{settings.server_port}/assets/tts_audio/"
|