better tts config for worker
This commit is contained in:
parent
2f90da34c9
commit
c2ed1429c9
2 changed files with 6 additions and 4 deletions
Binary file not shown.
|
|
@ -12,11 +12,13 @@ logger = get_logger(__name__)
|
|||
|
||||
class TTSService:
|
||||
def __init__(self):
|
||||
# Initialize Google TTS
|
||||
if settings.google_tts_credentials:
|
||||
# Initialize Google TTS (uses GOOGLE_APPLICATION_CREDENTIALS env var)
|
||||
# The same GCP credentials used for GCS also work for TTS
|
||||
try:
|
||||
self.google_client = texttospeech.TextToSpeechClient()
|
||||
else:
|
||||
logger.warning("Google TTS credentials not configured")
|
||||
logger.info("Google TTS client initialized successfully")
|
||||
except Exception as e:
|
||||
logger.warning(f"Google TTS credentials not configured: {e}")
|
||||
self.google_client = None
|
||||
|
||||
# Check ElevenLabs availability
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue