Spaces:
Sleeping
Sleeping
Upload infertest.py
Browse files- infertest.py +10 -2
infertest.py
CHANGED
@@ -96,10 +96,18 @@ def clean():
|
|
96 |
gr.Slider.update(visible=False)
|
97 |
)
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
|
101 |
-
|
102 |
-
@app.route('/convert_voice', methods=['POST'])
|
103 |
def convert_voice(spk_id, input_audio_path, voice_transform):
|
104 |
|
105 |
output_audio_path = vc_single(
|
|
|
96 |
gr.Slider.update(visible=False)
|
97 |
)
|
98 |
|
99 |
+
@app.route('/convert_voice', methods=['POST'])
|
100 |
+
def api_convert_voice():
|
101 |
+
data = request.json
|
102 |
+
spk_id = data['spk_id']
|
103 |
+
input_audio_path = data['input_audio_path']
|
104 |
+
voice_transform = data['voice_transform']
|
105 |
+
|
106 |
+
|
107 |
+
output_path = convert_voice(spk_id, input_audio_path, voice_transform)
|
108 |
+
return jsonify({"output_audio_path": output_path})
|
109 |
|
110 |
|
|
|
|
|
111 |
def convert_voice(spk_id, input_audio_path, voice_transform):
|
112 |
|
113 |
output_audio_path = vc_single(
|