Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,10 +42,11 @@ def generate_tts_custom(text, lang, speaker, model_size, model_name):
|
|
| 42 |
api_name="/generate_custom_voice"
|
| 43 |
)
|
| 44 |
print(result)
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
| 49 |
except Exception as e:
|
| 50 |
print(f"Error: {e}")
|
| 51 |
return None
|
|
@@ -63,10 +64,11 @@ def generate_voice_design(text, lang, instruct, model_name):
|
|
| 63 |
api_name="/generate_voice_design"
|
| 64 |
)
|
| 65 |
print(result)
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
|
|
|
| 70 |
except Exception as e:
|
| 71 |
print(f"Error: {e}")
|
| 72 |
return None
|
|
@@ -87,10 +89,11 @@ def generate_voice_clone(s1_wav, s1_txt, text, lang, model_name):
|
|
| 87 |
api_name="/generate_voice_clone"
|
| 88 |
)
|
| 89 |
print(result)
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
|
|
|
| 94 |
except Exception as e:
|
| 95 |
print(f"Error: {e}")
|
| 96 |
return None
|
|
@@ -113,10 +116,11 @@ def generate_podcast(text, s1_wav, s1_txt, s2_wav, s2_txt, lang, seed, model_nam
|
|
| 113 |
api_name="/dialogue_synthesis_function"
|
| 114 |
)
|
| 115 |
print(result)
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
|
|
|
| 120 |
except Exception as e:
|
| 121 |
print(f"Error: {e}")
|
| 122 |
return None
|
|
|
|
| 42 |
api_name="/generate_custom_voice"
|
| 43 |
)
|
| 44 |
print(result)
|
| 45 |
+
return result
|
| 46 |
+
# if isinstance(result, (tuple, list)):
|
| 47 |
+
# audio_path = result[0]
|
| 48 |
+
# print(f"Successfully extracted path: {audio_path}")
|
| 49 |
+
# return audio_path
|
| 50 |
except Exception as e:
|
| 51 |
print(f"Error: {e}")
|
| 52 |
return None
|
|
|
|
| 64 |
api_name="/generate_voice_design"
|
| 65 |
)
|
| 66 |
print(result)
|
| 67 |
+
return result
|
| 68 |
+
# if isinstance(result, (tuple, list)):
|
| 69 |
+
# audio_path = result[0]
|
| 70 |
+
# print(f"Successfully extracted path: {audio_path}")
|
| 71 |
+
# return audio_path
|
| 72 |
except Exception as e:
|
| 73 |
print(f"Error: {e}")
|
| 74 |
return None
|
|
|
|
| 89 |
api_name="/generate_voice_clone"
|
| 90 |
)
|
| 91 |
print(result)
|
| 92 |
+
return result
|
| 93 |
+
# if isinstance(result, (tuple, list)):
|
| 94 |
+
# audio_path = result[0]
|
| 95 |
+
# print(f"Successfully extracted path: {audio_path}")
|
| 96 |
+
# return audio_path
|
| 97 |
except Exception as e:
|
| 98 |
print(f"Error: {e}")
|
| 99 |
return None
|
|
|
|
| 116 |
api_name="/dialogue_synthesis_function"
|
| 117 |
)
|
| 118 |
print(result)
|
| 119 |
+
return result
|
| 120 |
+
# if isinstance(result, (tuple, list)):
|
| 121 |
+
# audio_path = result[0]
|
| 122 |
+
# print(f"Successfully extracted path: {audio_path}")
|
| 123 |
+
# return audio_path
|
| 124 |
except Exception as e:
|
| 125 |
print(f"Error: {e}")
|
| 126 |
return None
|