Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
|
@@ -59,7 +59,7 @@ DEFAULT_TTS_MODEL_CFG = [
|
|
| 59 |
|
| 60 |
# Конфигурация для F5-TTS_RUSSIAN (русский)
|
| 61 |
RUSSIAN_TTS_MODEL_CFG = [
|
| 62 |
-
"hf://Misha24-10/F5-TTS_RUSSIAN/
|
| 63 |
"hf://Misha24-10/F5-TTS_RUSSIAN/vocab.txt",
|
| 64 |
json.dumps(dict(dim=1024, depth=22, heads=16, ff_mult=2, text_dim=512, conv_layers=4)),
|
| 65 |
]
|
|
@@ -402,12 +402,6 @@ with gr.Blocks() as app_multistyle:
|
|
| 402 |
outputs=[speech_type_rows[i], speech_type_names[i], speech_type_audios[i], speech_type_ref_texts[i], speech_type_languages[i]],
|
| 403 |
)
|
| 404 |
|
| 405 |
-
gen_text_input_multistyle = gr.Textbox(
|
| 406 |
-
label="Text to Generate",
|
| 407 |
-
lines=10,
|
| 408 |
-
placeholder="Enter the script with speaker names (or emotion types) at the start of each block, e.g.:\n\n{Regular} Привет, я хочу заказать пиццу.\n{Surprised} What, no pepperoni?\n{Sad} Я так хотел пиццу...\n{Angry} Ты что, шутишь?\n{Whisper} Ладно, я уйду.\n{Shouting} Почему так всегда?!",
|
| 409 |
-
)
|
| 410 |
-
|
| 411 |
def make_insert_speech_type_fn(index):
|
| 412 |
def insert_speech_type_fn(current_text, speech_type_name):
|
| 413 |
current_text = current_text or ""
|
|
@@ -489,7 +483,6 @@ with gr.Blocks() as app_multistyle:
|
|
| 489 |
)
|
| 490 |
|
| 491 |
def validate_speech_types(gen_text, regular_name, *args):
|
| 492 |
-
speech_type_names_list = args[:max_speech_types]
|
| 493 |
speech_types_available = set()
|
| 494 |
if regular_name:
|
| 495 |
speech_types_available.add(regular_name)
|
|
|
|
| 59 |
|
| 60 |
# Конфигурация для F5-TTS_RUSSIAN (русский)
|
| 61 |
RUSSIAN_TTS_MODEL_CFG = [
|
| 62 |
+
"hf://Misha24-10/F5-TTS_RUSSIAN/model_240000_inference.safetensors",
|
| 63 |
"hf://Misha24-10/F5-TTS_RUSSIAN/vocab.txt",
|
| 64 |
json.dumps(dict(dim=1024, depth=22, heads=16, ff_mult=2, text_dim=512, conv_layers=4)),
|
| 65 |
]
|
|
|
|
| 402 |
outputs=[speech_type_rows[i], speech_type_names[i], speech_type_audios[i], speech_type_ref_texts[i], speech_type_languages[i]],
|
| 403 |
)
|
| 404 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 405 |
def make_insert_speech_type_fn(index):
|
| 406 |
def insert_speech_type_fn(current_text, speech_type_name):
|
| 407 |
current_text = current_text or ""
|
|
|
|
| 483 |
)
|
| 484 |
|
| 485 |
def validate_speech_types(gen_text, regular_name, *args):
|
|
|
|
| 486 |
speech_types_available = set()
|
| 487 |
if regular_name:
|
| 488 |
speech_types_available.add(regular_name)
|