INNER CODE UNIT · Python

initialize_tts

existence-master/Sentient · src/server/main/app.py:114

def initialize_tts():
    global tts_model_instance
    logger.info(f"Initializing TTS model provider: {TTS_PROVIDER}")
    if TTS_PROVIDER == "ORPHEUS":
        try:
            if OrpheusTTS:
                tts_model_instance = OrpheusTTS(
                    model_path=ORPHEUS_MODEL_PATH
                )
            else:
                logger.error("OrpheusTTS is configured but could not be imported. Check dependencies.")
        except Exception as e:
            logger.error(f"Failed to initialize OrpheusTTS: {e}", exc_info=True)
    elif TTS_PROVIDER == "ELEVENLABS":
        if not ELEVENLABS_API_KEY:
            logger.error("ELEVENLABS_API_KEY not set for TTS.")
        else:
            tts_model_instance = ElevenLabsTTSImpl()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…