limit inference parameters
Browse files- infer_onnx.py +7 -7
infer_onnx.py
CHANGED
@@ -152,7 +152,8 @@ def vocos_inference(mel,denoise):
|
|
152 |
return y
|
153 |
|
154 |
|
155 |
-
def tts(text:str, accent:str, spk_name:str, temperature:float, length_scale:float
|
|
|
156 |
spk_id = speaker_id_dict[accent][spk_name]
|
157 |
sid = np.array([int(spk_id)]) if spk_id is not None else None
|
158 |
text_matcha , text_lengths = process_text(0,text,"cpu",cleaner=cleaners[accent])
|
@@ -242,21 +243,20 @@ matcha_inference = gr.Interface(
|
|
242 |
speaker_dropdown,
|
243 |
gr.Slider(
|
244 |
0.1,
|
245 |
-
|
246 |
-
value=0.
|
247 |
step=0.01,
|
248 |
label="Temperature",
|
249 |
info=f"Temperature",
|
250 |
),
|
251 |
gr.Slider(
|
252 |
-
0.
|
253 |
-
|
254 |
-
value=
|
255 |
step=0.01,
|
256 |
label="Length scale",
|
257 |
info=f"Controls speech pace, larger values for slower pace and smaller values for faster pace",
|
258 |
),
|
259 |
-
gr.Checkbox(label="Denoise", info="Removes model bias from vocos", value=True),
|
260 |
],
|
261 |
outputs=[gr.Audio(label="Matcha vocos", interactive=False, type="filepath")]
|
262 |
)
|
|
|
152 |
return y
|
153 |
|
154 |
|
155 |
+
def tts(text:str, accent:str, spk_name:str, temperature:float, length_scale:float):
|
156 |
+
denoise=True
|
157 |
spk_id = speaker_id_dict[accent][spk_name]
|
158 |
sid = np.array([int(spk_id)]) if spk_id is not None else None
|
159 |
text_matcha , text_lengths = process_text(0,text,"cpu",cleaner=cleaners[accent])
|
|
|
243 |
speaker_dropdown,
|
244 |
gr.Slider(
|
245 |
0.1,
|
246 |
+
0.8,
|
247 |
+
value=0.2,
|
248 |
step=0.01,
|
249 |
label="Temperature",
|
250 |
info=f"Temperature",
|
251 |
),
|
252 |
gr.Slider(
|
253 |
+
0.8,
|
254 |
+
1.1,
|
255 |
+
value=0.89,
|
256 |
step=0.01,
|
257 |
label="Length scale",
|
258 |
info=f"Controls speech pace, larger values for slower pace and smaller values for faster pace",
|
259 |
),
|
|
|
260 |
],
|
261 |
outputs=[gr.Audio(label="Matcha vocos", interactive=False, type="filepath")]
|
262 |
)
|