Spaces:
Paused
Paused
Update app_rvc.py
Browse files- app_rvc.py +13 -4
app_rvc.py
CHANGED
|
@@ -5,12 +5,17 @@ os.system("pip install -q -r requirements_xtts.txt")
|
|
| 5 |
os.system("pip install -q TTS==0.21.1 --no-deps")
|
| 6 |
import spaces
|
| 7 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
from madkoala.logging_setup import (
|
| 9 |
logger,
|
| 10 |
set_logging_level,
|
| 11 |
configure_logging_libs,
|
| 12 |
); configure_logging_libs() # noqa
|
| 13 |
import whisperx
|
|
|
|
| 14 |
from madkoala.audio_segments import create_translated_audio
|
| 15 |
from madkoala.text_to_speech import (
|
| 16 |
audio_segmentation_to_voice,
|
|
@@ -100,7 +105,6 @@ import argparse
|
|
| 100 |
import time
|
| 101 |
import hashlib
|
| 102 |
import sys
|
| 103 |
-
import os
|
| 104 |
|
| 105 |
directories = [
|
| 106 |
"downloads",
|
|
@@ -119,7 +123,6 @@ directories = [
|
|
| 119 |
]
|
| 120 |
|
| 121 |
|
| 122 |
-
|
| 123 |
class TTS_Info:
|
| 124 |
def __init__(self, piper_enabled, xtts_enabled):
|
| 125 |
self.list_edge = edge_tts_voices_list()
|
|
@@ -1613,6 +1616,9 @@ span.or.svelte-b0hvie {
|
|
| 1613 |
tr.file.svelte-18wv37q {
|
| 1614 |
background-color: #1c1d21 !important;
|
| 1615 |
}
|
|
|
|
|
|
|
|
|
|
| 1616 |
a {
|
| 1617 |
color: #8c20f8 !important;
|
| 1618 |
}
|
|
@@ -1646,6 +1652,10 @@ input.svelte-3pzdsv {
|
|
| 1646 |
background-position-x: center;
|
| 1647 |
opacity: 0.9;
|
| 1648 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1649 |
#component-2 {
|
| 1650 |
display: none;
|
| 1651 |
}
|
|
@@ -3071,11 +3081,10 @@ if __name__ == "__main__":
|
|
| 3071 |
|
| 3072 |
app.queue()
|
| 3073 |
|
| 3074 |
-
|
| 3075 |
app.launch(
|
| 3076 |
max_threads=1,
|
| 3077 |
share=args.public_url,
|
| 3078 |
show_error=True,
|
| 3079 |
quiet=False,
|
| 3080 |
debug=(True if logger.isEnabledFor(logging.DEBUG) else False),
|
| 3081 |
-
)
|
|
|
|
| 5 |
os.system("pip install -q TTS==0.21.1 --no-deps")
|
| 6 |
import spaces
|
| 7 |
import torch
|
| 8 |
+
if os.environ.get("ZERO_GPU") != "TRUE" and torch.cuda.is_available():
|
| 9 |
+
# onnxruntime GPU
|
| 10 |
+
os.system("pip install ort-nightly-gpu --index-url=https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ort-cuda-12-nightly/pypi/simple/")
|
| 11 |
+
import librosa
|
| 12 |
from madkoala.logging_setup import (
|
| 13 |
logger,
|
| 14 |
set_logging_level,
|
| 15 |
configure_logging_libs,
|
| 16 |
); configure_logging_libs() # noqa
|
| 17 |
import whisperx
|
| 18 |
+
import os
|
| 19 |
from madkoala.audio_segments import create_translated_audio
|
| 20 |
from madkoala.text_to_speech import (
|
| 21 |
audio_segmentation_to_voice,
|
|
|
|
| 105 |
import time
|
| 106 |
import hashlib
|
| 107 |
import sys
|
|
|
|
| 108 |
|
| 109 |
directories = [
|
| 110 |
"downloads",
|
|
|
|
| 123 |
]
|
| 124 |
|
| 125 |
|
|
|
|
| 126 |
class TTS_Info:
|
| 127 |
def __init__(self, piper_enabled, xtts_enabled):
|
| 128 |
self.list_edge = edge_tts_voices_list()
|
|
|
|
| 1616 |
tr.file.svelte-18wv37q {
|
| 1617 |
background-color: #1c1d21 !important;
|
| 1618 |
}
|
| 1619 |
+
#component-1 > div.svelte-1ed2p3z > div > span > center > strong > font {
|
| 1620 |
+
display: none !important;
|
| 1621 |
+
}
|
| 1622 |
a {
|
| 1623 |
color: #8c20f8 !important;
|
| 1624 |
}
|
|
|
|
| 1652 |
background-position-x: center;
|
| 1653 |
opacity: 0.9;
|
| 1654 |
}
|
| 1655 |
+
#component-1 > div> div > span > center > strong > font {
|
| 1656 |
+
display: none !important;
|
| 1657 |
+
opacity: 0 !important;
|
| 1658 |
+
}
|
| 1659 |
#component-2 {
|
| 1660 |
display: none;
|
| 1661 |
}
|
|
|
|
| 3081 |
|
| 3082 |
app.queue()
|
| 3083 |
|
|
|
|
| 3084 |
app.launch(
|
| 3085 |
max_threads=1,
|
| 3086 |
share=args.public_url,
|
| 3087 |
show_error=True,
|
| 3088 |
quiet=False,
|
| 3089 |
debug=(True if logger.isEnabledFor(logging.DEBUG) else False),
|
| 3090 |
+
)
|