Spaces:
Configuration error
Configuration error
Kangarroar
commited on
Commit
•
c0c17c5
1
Parent(s):
a9b5548
Update app.py
Browse files
app.py
CHANGED
@@ -27,9 +27,11 @@ from infer_tools.infer_tool import *
|
|
27 |
import io
|
28 |
|
29 |
clip_completed = False
|
30 |
-
def render_audio(ckpt_temp_file, config_temp_file, audio_temp_file, title):
|
31 |
logging.getLogger('numba').setLevel(logging.WARNING)
|
32 |
title = int(title)
|
|
|
|
|
33 |
project_name = "Unnamed"
|
34 |
model_path = ckpt_temp_file
|
35 |
config_path= config_temp_file
|
@@ -45,7 +47,7 @@ def render_audio(ckpt_temp_file, config_temp_file, audio_temp_file, title):
|
|
45 |
|
46 |
# Show the spinner and run the run_clip function inside the 'with' block
|
47 |
with st.spinner("Rendering Audio..."):
|
48 |
-
f0_tst, f0_pred, audio = run_clip(svc_model,file_path=wav_fn, key=key, acc=
|
49 |
use_gt_mel=False, add_noise_step=500,project_name=project_name,out_path=wav_gen)
|
50 |
clip_completed = True
|
51 |
if clip_completed:
|
@@ -110,6 +112,7 @@ if "audio_temp_file" in locals():
|
|
110 |
st.success("File saved to: {}".format(audio_temp_file))
|
111 |
# Add a text input for the title with a default value of 0
|
112 |
title = st.text_input("Key", value="0")
|
|
|
113 |
# Add a button to start the rendering process
|
114 |
# Add a button to start the rendering process
|
115 |
if st.button("Render audio"):
|
@@ -117,7 +120,7 @@ if st.button("Render audio"):
|
|
117 |
with open("network/hubert/Hifi.txt", "r") as f:
|
118 |
correct_password = f.read().strip()
|
119 |
if password == correct_password:
|
120 |
-
render_audio(ckpt_temp_file, config_temp_file, audio_temp_file, title)
|
121 |
|
122 |
else:
|
123 |
st.error("Incorrect password")
|
|
|
27 |
import io
|
28 |
|
29 |
clip_completed = False
|
30 |
+
def render_audio(ckpt_temp_file, config_temp_file, audio_temp_file, title, title2):
|
31 |
logging.getLogger('numba').setLevel(logging.WARNING)
|
32 |
title = int(title)
|
33 |
+
title2 = int(title2)
|
34 |
+
|
35 |
project_name = "Unnamed"
|
36 |
model_path = ckpt_temp_file
|
37 |
config_path= config_temp_file
|
|
|
47 |
|
48 |
# Show the spinner and run the run_clip function inside the 'with' block
|
49 |
with st.spinner("Rendering Audio..."):
|
50 |
+
f0_tst, f0_pred, audio = run_clip(svc_model,file_path=wav_fn, key=key, acc=title2, use_crepe=True, use_pe=True, thre=0.05,
|
51 |
use_gt_mel=False, add_noise_step=500,project_name=project_name,out_path=wav_gen)
|
52 |
clip_completed = True
|
53 |
if clip_completed:
|
|
|
112 |
st.success("File saved to: {}".format(audio_temp_file))
|
113 |
# Add a text input for the title with a default value of 0
|
114 |
title = st.text_input("Key", value="0")
|
115 |
+
title2 = st.text_input("Speedup", value="20")
|
116 |
# Add a button to start the rendering process
|
117 |
# Add a button to start the rendering process
|
118 |
if st.button("Render audio"):
|
|
|
120 |
with open("network/hubert/Hifi.txt", "r") as f:
|
121 |
correct_password = f.read().strip()
|
122 |
if password == correct_password:
|
123 |
+
render_audio(ckpt_temp_file, config_temp_file, audio_temp_file, title, title2)
|
124 |
|
125 |
else:
|
126 |
st.error("Incorrect password")
|