Update app_rvc.py
Browse files- app_rvc.py +6 -8
app_rvc.py
CHANGED
|
@@ -509,12 +509,12 @@ class SoniTranslate(SoniTrCache):
|
|
| 509 |
|
| 510 |
if (
|
| 511 |
transcriber_model == "OpenAI_API_Whisper"
|
| 512 |
-
and SOURCE_LANGUAGE == "
|
| 513 |
):
|
| 514 |
logger.warning(
|
| 515 |
"OpenAI API Whisper only supports Chinese (Simplified)."
|
| 516 |
)
|
| 517 |
-
SOURCE_LANGUAGE = "
|
| 518 |
|
| 519 |
if (
|
| 520 |
text_segmentation_scale in ["word", "character"]
|
|
@@ -668,7 +668,7 @@ class SoniTranslate(SoniTrCache):
|
|
| 668 |
if os.environ.get("IS_DEMO") == "TRUE":
|
| 669 |
duration_verify = librosa.get_duration(filename=base_audio_wav)
|
| 670 |
logger.info(f"Duration: {duration_verify} seconds")
|
| 671 |
-
if duration_verify >
|
| 672 |
raise RuntimeError(
|
| 673 |
"The audio is too long to process in this demo. Alternatively, you"
|
| 674 |
" can install the app locally or use the Colab notebook available "
|
|
@@ -1477,7 +1477,7 @@ class SoniTranslate(SoniTrCache):
|
|
| 1477 |
return output
|
| 1478 |
|
| 1479 |
|
| 1480 |
-
title = "<center><strong><font size='7'>📽️ SoniTranslate
|
| 1481 |
|
| 1482 |
|
| 1483 |
def create_gui(theme, logs_in_gui=False):
|
|
@@ -1490,11 +1490,9 @@ def create_gui(theme, logs_in_gui=False):
|
|
| 1490 |
"""
|
| 1491 |
|
| 1492 |
<details>
|
| 1493 |
-
<summary style="font-size: 1.5em;"
|
| 1494 |
<ul>
|
| 1495 |
-
<li>🚀
|
| 1496 |
-
<li>❗ If you see `queue` when using this, it means another user is currently using it, and you need to wait until they are finished.</li>
|
| 1497 |
-
<li>🔒 Some functions are disabled, but if you duplicate this with a GPU and set the value in secrets "ZERO_GPU" to FALSE, you can use the app with full GPU acceleration. ⚡</li>
|
| 1498 |
</ul>
|
| 1499 |
</details>
|
| 1500 |
"""
|
|
|
|
| 509 |
|
| 510 |
if (
|
| 511 |
transcriber_model == "OpenAI_API_Whisper"
|
| 512 |
+
and SOURCE_LANGUAGE == "es-Es"
|
| 513 |
):
|
| 514 |
logger.warning(
|
| 515 |
"OpenAI API Whisper only supports Chinese (Simplified)."
|
| 516 |
)
|
| 517 |
+
SOURCE_LANGUAGE = "es"
|
| 518 |
|
| 519 |
if (
|
| 520 |
text_segmentation_scale in ["word", "character"]
|
|
|
|
| 668 |
if os.environ.get("IS_DEMO") == "TRUE":
|
| 669 |
duration_verify = librosa.get_duration(filename=base_audio_wav)
|
| 670 |
logger.info(f"Duration: {duration_verify} seconds")
|
| 671 |
+
if duration_verify > 10800:
|
| 672 |
raise RuntimeError(
|
| 673 |
"The audio is too long to process in this demo. Alternatively, you"
|
| 674 |
" can install the app locally or use the Colab notebook available "
|
|
|
|
| 1477 |
return output
|
| 1478 |
|
| 1479 |
|
| 1480 |
+
title = "<center><strong><font size='7'>📽️ SoniTranslate Doblaje de videos con IA </font></strong></center>"
|
| 1481 |
|
| 1482 |
|
| 1483 |
def create_gui(theme, logs_in_gui=False):
|
|
|
|
| 1490 |
"""
|
| 1491 |
|
| 1492 |
<details>
|
| 1493 |
+
<summary style="font-size: 1.5em;"> No cierres la ventana hasta que desarges tu video traducido</summary>
|
| 1494 |
<ul>
|
| 1495 |
+
<li>🚀 Traduce video con varias voces⏳</li>
|
|
|
|
|
|
|
| 1496 |
</ul>
|
| 1497 |
</details>
|
| 1498 |
"""
|