Update app.py
Browse files
app.py
CHANGED
@@ -112,10 +112,8 @@ with st.form("my_form"):
|
|
112 |
|
113 |
text = st.text_area("Text to generate audio from:",max_chars=500)
|
114 |
# Default parameter values
|
115 |
-
length_scale = 1
|
116 |
-
length_scale = st.slider('LS?', 0.000, 5.000, 0.001, label_visibility="visible")
|
117 |
submitted = st.form_submit_button("Submit")
|
118 |
-
noise_scale = st.slider('Noise scale?', 0.0, 5.0, 0.001, label_visibility="visible")
|
119 |
if submitted:
|
120 |
with st.spinner("Please, wait... :)"):
|
121 |
filename = tempfile.NamedTemporaryFile(suffix=".wav", delete=False)
|
@@ -126,9 +124,9 @@ with st.form("my_form"):
|
|
126 |
|
127 |
match option:
|
128 |
case "Model 1":
|
129 |
-
MODEL = "last.onnx"
|
130 |
-
case "Model 2":
|
131 |
MODEL = "last2.onnx"
|
|
|
|
|
132 |
|
133 |
cmd = "echo '" + text + "' | " + BASE_PATH + "/piper/piper --model " + os.path.join(BASE_PATH_MODEL, MODEL) + " --speaker " + SPEAKER_ID + " --output_file " + filename.name + " --length-scale " + str(length_scale)
|
134 |
|
|
|
112 |
|
113 |
text = st.text_area("Text to generate audio from:",max_chars=500)
|
114 |
# Default parameter values
|
115 |
+
length_scale = st.slider('LS?', 0.000, 5.000, 0.001, 1.0, label_visibility="visible")
|
|
|
116 |
submitted = st.form_submit_button("Submit")
|
|
|
117 |
if submitted:
|
118 |
with st.spinner("Please, wait... :)"):
|
119 |
filename = tempfile.NamedTemporaryFile(suffix=".wav", delete=False)
|
|
|
124 |
|
125 |
match option:
|
126 |
case "Model 1":
|
|
|
|
|
127 |
MODEL = "last2.onnx"
|
128 |
+
case "Model 2":
|
129 |
+
MODEL = "last.onnx"
|
130 |
|
131 |
cmd = "echo '" + text + "' | " + BASE_PATH + "/piper/piper --model " + os.path.join(BASE_PATH_MODEL, MODEL) + " --speaker " + SPEAKER_ID + " --output_file " + filename.name + " --length-scale " + str(length_scale)
|
132 |
|