add banbanmini backend
This commit is contained in:
35
talkingq-url/services/tts_config.py
Normal file
35
talkingq-url/services/tts_config.py
Normal file
@@ -0,0 +1,35 @@
|
||||
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/"
|
||||
Reference in New Issue
Block a user