Michael Hu commited on
Commit
e68cae8
·
1 Parent(s): 451d2b1
Files changed (1) hide show
  1. utils/tts.py +1 -3
utils/tts.py CHANGED
@@ -9,7 +9,7 @@ logger = logging.getLogger(__name__)
9
 
10
  # Flag to track TTS engine availability
11
  KOKORO_AVAILABLE = False
12
- KOKORO_SPACE_AVAILABLE = False
13
  DIA_AVAILABLE = False
14
 
15
  # Try to import Kokoro first
@@ -21,8 +21,6 @@ except AttributeError as e:
21
  # Specifically catch the EspeakWrapper.set_data_path error
22
  if "EspeakWrapper" in str(e) and "set_data_path" in str(e):
23
  logger.warning("Kokoro import failed due to EspeakWrapper.set_data_path issue, falling back to Kokoro FastAPI server")
24
- if result:
25
- KOKORO_SPACE_AVAILABLE = True
26
  else:
27
  # Re-raise if it's a different error
28
  logger.error(f"Kokoro import failed with unexpected error: {str(e)}")
 
9
 
10
  # Flag to track TTS engine availability
11
  KOKORO_AVAILABLE = False
12
+ KOKORO_SPACE_AVAILABLE = True
13
  DIA_AVAILABLE = False
14
 
15
  # Try to import Kokoro first
 
21
  # Specifically catch the EspeakWrapper.set_data_path error
22
  if "EspeakWrapper" in str(e) and "set_data_path" in str(e):
23
  logger.warning("Kokoro import failed due to EspeakWrapper.set_data_path issue, falling back to Kokoro FastAPI server")
 
 
24
  else:
25
  # Re-raise if it's a different error
26
  logger.error(f"Kokoro import failed with unexpected error: {str(e)}")