Spaces:
Sleeping
Sleeping
Michael Hu
commited on
Commit
·
d5c9fdf
1
Parent(s):
bb33c13
re-activate dia
Browse files- requirements.txt +2 -2
- utils/tts.py +7 -7
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
streamlit
|
| 2 |
nltk>=3.8
|
| 3 |
librosa>=0.10
|
| 4 |
ffmpeg-python>=0.2
|
|
@@ -12,4 +12,4 @@ soundfile>=0.13.0
|
|
| 12 |
kokoro>=0.7.9
|
| 13 |
ordered-set>=4.1.0
|
| 14 |
phonemizer-fork>=3.3.2
|
| 15 |
-
|
|
|
|
| 1 |
+
streamlit
|
| 2 |
nltk>=3.8
|
| 3 |
librosa>=0.10
|
| 4 |
ffmpeg-python>=0.2
|
|
|
|
| 12 |
kokoro>=0.7.9
|
| 13 |
ordered-set>=4.1.0
|
| 14 |
phonemizer-fork>=3.3.2
|
| 15 |
+
descript-audio-codec
|
utils/tts.py
CHANGED
|
@@ -92,13 +92,13 @@ class TTSEngine:
|
|
| 92 |
# Fall through to try Dia
|
| 93 |
|
| 94 |
# Try Dia if Kokoro is not available or failed to initialize
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
|
| 103 |
# Use dummy if no TTS engines are available
|
| 104 |
if self.engine_type is None:
|
|
|
|
| 92 |
# Fall through to try Dia
|
| 93 |
|
| 94 |
# Try Dia if Kokoro is not available or failed to initialize
|
| 95 |
+
if self.engine_type is None and DIA_AVAILABLE:
|
| 96 |
+
logger.info("Using Dia as fallback TTS engine")
|
| 97 |
+
# For Dia, we don't need to initialize anything here
|
| 98 |
+
# The model will be lazy-loaded when needed
|
| 99 |
+
self.pipeline = None
|
| 100 |
+
self.engine_type = "dia"
|
| 101 |
+
logger.info("TTS engine initialized with Dia (lazy loading)")
|
| 102 |
|
| 103 |
# Use dummy if no TTS engines are available
|
| 104 |
if self.engine_type is None:
|