Skip to content

Commit

Permalink
1.3.0 ( 7/* - Renewal Process... ) BACKUP
Browse files Browse the repository at this point in the history
  • Loading branch information
Bebra777228 committed Nov 13, 2024
1 parent 443afa5 commit 74e3577
Show file tree
Hide file tree
Showing 8 changed files with 237 additions and 156 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import gradio as gr

from tabs.edge_tts.edge_tts import edge_tts_tab
#from tabs.inference.inference_batch import inference_batch_tab
from tabs.inference.inference_batch import inference_batch_tab
from tabs.inference.inference_single import inference_single_tab
from tabs.install.install import (
files_upload,
Expand Down Expand Up @@ -40,8 +40,8 @@
with gr.Tab("Преобразование голоса"):
with gr.Tab("Одиночное преобразование"):
inference_single_tab()
#with gr.Tab("Пакетное преобразование"):
# inference_batch_tab()
with gr.Tab("Пакетное преобразование"):
inference_batch_tab()

with gr.Tab("Преобразование текста в речь"):
edge_tts_tab()
Expand Down
6 changes: 3 additions & 3 deletions app_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import gradio as gr

#from tabs.inference.inference_batch import inference_batch_tab
from tabs.inference.inference_batch import inference_batch_tab
from tabs.inference.inference_single import inference_single_tab
from tabs.install.install import files_upload, output_message, zip_upload
from tabs.welcome import welcome_tab
Expand Down Expand Up @@ -32,8 +32,8 @@
with gr.Tab("Преобразование голоса"):
with gr.Tab("Одиночное преобразование"):
inference_single_tab()
#with gr.Tab("Пакетное преобразование"):
# inference_batch_tab()
with gr.Tab("Пакетное преобразование"):
inference_batch_tab()

with gr.Tab("Загрузка RVC моделей"):
zip_upload(output_message_component)
Expand Down
23 changes: 13 additions & 10 deletions rvc/cli/edge_tts_cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import argparse
import os
from rvc.infer.infer import tts_infer, RVC_MODELS_DIR

from tabs.edge_tts.edge_tts import edge_tts_pipeline

rvc_models_dir = os.path.join(os.getcwd(), "models")

parser = argparse.ArgumentParser(
description="Замена голоса в директории output/", add_help=True
Expand All @@ -15,31 +18,31 @@
parser.add_argument("-f0", "--method", type=str, default="rmvpe+")
parser.add_argument("-hop", "--hop_length", type=int, default=128)
parser.add_argument("-pro", "--protect", type=float, default=0.33)
parser.add_argument("-f0min", "--f0_min", type=int, default=50)
parser.add_argument("-f0max", "--f0_max", type=int, default=1100)
parser.add_argument("-f0min", "--f0_min", type=int, default="50")
parser.add_argument("-f0max", "--f0_max", type=int, default="1100")
parser.add_argument("-f", "--format", type=str, default="mp3")
args = parser.parse_args()

model_name = args.model_name
if not os.path.exists(os.path.join(RVC_MODELS_DIR, model_name)):
if not os.path.exists(os.path.join(rvc_models_dir, model_name)):
raise Exception(
f"\033[91mМодели {model_name} не существует. Возможно, вы неправильно ввели имя.\033[0m"
)

cover_path = tts_infer(
cover_path = edge_tts_pipeline(
text=args.text_input,
voice_model=model_name,
input_path_or_text=args.text_input,
index_rate=args.index_rate,
voice=args.tts_voice,
pitch=args.pitch,
f0_method=args.method,
index_rate=args.index_rate,
filter_radius=args.filter_radius,
volume_envelope=args.volume_envelope,
protect=args.protect,
f0_method=args.method,
hop_length=args.hop_length,
protect=args.protect,
f0_min=args.f0_min,
f0_max=args.f0_max,
output_format=args.format,
voice=args.tts_voice,
)

print("\033[1;92m\nГолос успешно заменен!\n\033[0m")
21 changes: 12 additions & 9 deletions rvc/cli/rvc_cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import argparse
import os
from rvc.infer.infer import rvc_infer, RVC_MODELS_DIR

from tabs.inference.inference_single import voice_pipeline_single

rvc_models_dir = os.path.join(os.getcwd(), "models")

parser = argparse.ArgumentParser(
description="Замена голоса в директории output/", add_help=True
Expand All @@ -14,27 +17,27 @@
parser.add_argument("-f0", "--method", type=str, default="rmvpe+")
parser.add_argument("-hop", "--hop_length", type=int, default=128)
parser.add_argument("-pro", "--protect", type=float, default=0.33)
parser.add_argument("-f0min", "--f0_min", type=int, default=50)
parser.add_argument("-f0max", "--f0_max", type=int, default=1100)
parser.add_argument("-f0min", "--f0_min", type=int, default="50")
parser.add_argument("-f0max", "--f0_max", type=int, default="1100")
parser.add_argument("-f", "--format", type=str, default="mp3")
args = parser.parse_args()

model_name = args.model_name
if not os.path.exists(os.path.join(RVC_MODELS_DIR, model_name)):
if not os.path.exists(os.path.join(rvc_models_dir, model_name)):
raise Exception(
f"\033[91mМодели {model_name} не существует. Возможно, вы неправильно ввели имя.\033[0m"
)

cover_path = rvc_infer(
cover_path = voice_pipeline_single(
uploaded_file=args.song_input,
voice_model=model_name,
input_path_or_text=args.song_input,
index_rate=args.index_rate,
pitch=args.pitch,
f0_method=args.method,
index_rate=args.index_rate,
filter_radius=args.filter_radius,
volume_envelope=args.volume_envelope,
protect=args.protect,
f0_method=args.method,
hop_length=args.hop_length,
protect=args.protect,
f0_min=args.f0_min,
f0_max=args.f0_max,
output_format=args.format,
Expand Down
Loading

0 comments on commit 74e3577

Please sign in to comment.