Spaces:
Runtime error
Runtime error
DJQmUKV
commited on
Commit
·
802ef36
1
Parent(s):
ec32fe5
revert: unrelated "fix" commit
Browse filesThis reverts commit ec32fe5afeacb31dcfc80ca4220a27de615df945.
- app_multi.py +4 -4
app_multi.py
CHANGED
|
@@ -189,7 +189,7 @@ def vc_func(input_audio, model_index, pitch_adjust, f0_method, feat_ratio):
|
|
| 189 |
return ((model['target_sr'], output_audio), 'Success')
|
| 190 |
|
| 191 |
|
| 192 |
-
def edge_tts_vc_func(
|
| 193 |
input_text, model_index, tts_speaker, pitch_adjust, f0_method, feat_ratio
|
| 194 |
):
|
| 195 |
if input_text is None:
|
|
@@ -202,7 +202,7 @@ def edge_tts_vc_func(
|
|
| 202 |
return (None, 'Please select a model.')
|
| 203 |
|
| 204 |
speaker = tts_speakers_list[tts_speaker]['ShortName']
|
| 205 |
-
(tts_np, tts_sr) =
|
| 206 |
return vc_func(
|
| 207 |
(tts_sr, tts_np),
|
| 208 |
model_index,
|
|
@@ -253,10 +253,10 @@ def _example_vc(input_audio, model_index, pitch_adjust, f0_method, feat_ratio):
|
|
| 253 |
)
|
| 254 |
|
| 255 |
|
| 256 |
-
def _example_edge_tts(
|
| 257 |
input_text, model_index, tts_speaker, pitch_adjust, f0_method, feat_ratio
|
| 258 |
):
|
| 259 |
-
(audio, message) = edge_tts_vc_func(
|
| 260 |
input_text, model_index, tts_speaker, pitch_adjust, f0_method,
|
| 261 |
feat_ratio
|
| 262 |
)
|
|
|
|
| 189 |
return ((model['target_sr'], output_audio), 'Success')
|
| 190 |
|
| 191 |
|
| 192 |
+
async def edge_tts_vc_func(
|
| 193 |
input_text, model_index, tts_speaker, pitch_adjust, f0_method, feat_ratio
|
| 194 |
):
|
| 195 |
if input_text is None:
|
|
|
|
| 202 |
return (None, 'Please select a model.')
|
| 203 |
|
| 204 |
speaker = tts_speakers_list[tts_speaker]['ShortName']
|
| 205 |
+
(tts_np, tts_sr) = await util.call_edge_tts(speaker, input_text)
|
| 206 |
return vc_func(
|
| 207 |
(tts_sr, tts_np),
|
| 208 |
model_index,
|
|
|
|
| 253 |
)
|
| 254 |
|
| 255 |
|
| 256 |
+
async def _example_edge_tts(
|
| 257 |
input_text, model_index, tts_speaker, pitch_adjust, f0_method, feat_ratio
|
| 258 |
):
|
| 259 |
+
(audio, message) = await edge_tts_vc_func(
|
| 260 |
input_text, model_index, tts_speaker, pitch_adjust, f0_method,
|
| 261 |
feat_ratio
|
| 262 |
)
|