Update goai_helpers/goai_tts2.py
Browse files- goai_helpers/goai_tts2.py +5 -21
goai_helpers/goai_tts2.py
CHANGED
|
@@ -11,7 +11,7 @@ from huggingface_hub import hf_hub_download, hf_hub_url, login
|
|
| 11 |
from TTS.tts.configs.xtts_config import XttsConfig
|
| 12 |
from TTS.tts.models.xtts import Xtts
|
| 13 |
|
| 14 |
-
from goai_helpers.utils import download_file, diviser_phrases_moore
|
| 15 |
from goai_helpers.goai_traduction import goai_traduction
|
| 16 |
|
| 17 |
# authentification
|
|
@@ -251,16 +251,8 @@ def goai_tts2(
|
|
| 251 |
yield text, (sampling_rate, audio_array.numpy()), None, None
|
| 252 |
|
| 253 |
# enhance audio
|
| 254 |
-
denoised_audio, enhanced_audio = enhance_speech(
|
| 255 |
-
audio_array,
|
| 256 |
-
sampling_rate,
|
| 257 |
-
solver,
|
| 258 |
-
nfe,
|
| 259 |
-
prior_temp,
|
| 260 |
-
denoise_before_enhancement
|
| 261 |
-
)
|
| 262 |
|
| 263 |
-
yield (sampling_rate, audio_array.numpy())
|
| 264 |
|
| 265 |
|
| 266 |
|
|
@@ -297,14 +289,6 @@ def goai_ttt_tts(
|
|
| 297 |
|
| 298 |
yield mos_text, (sampling_rate, audio_array.numpy()), None, None
|
| 299 |
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
sampling_rate,
|
| 304 |
-
solver,
|
| 305 |
-
nfe,
|
| 306 |
-
prior_temp,
|
| 307 |
-
denoise_before_enhancement
|
| 308 |
-
)
|
| 309 |
-
|
| 310 |
-
yield mos_text, (sampling_rate, audio_array.numpy()), denoised_audio, enhanced_audio
|
|
|
|
| 11 |
from TTS.tts.configs.xtts_config import XttsConfig
|
| 12 |
from TTS.tts.models.xtts import Xtts
|
| 13 |
|
| 14 |
+
from goai_helpers.utils import download_file, diviser_phrases_moore
|
| 15 |
from goai_helpers.goai_traduction import goai_traduction
|
| 16 |
|
| 17 |
# authentification
|
|
|
|
| 251 |
yield text, (sampling_rate, audio_array.numpy()), None, None
|
| 252 |
|
| 253 |
# enhance audio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
|
| 255 |
+
yield (sampling_rate, audio_array.numpy())
|
| 256 |
|
| 257 |
|
| 258 |
|
|
|
|
| 289 |
|
| 290 |
yield mos_text, (sampling_rate, audio_array.numpy()), None, None
|
| 291 |
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
yield mos_text, (sampling_rate, audio_array.numpy())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|