update apis
Browse files
app.py
CHANGED
@@ -1,25 +1,27 @@
|
|
1 |
import gradio as gr
|
2 |
-
from gradio_client import Client
|
3 |
|
4 |
def get_speech(text, voice):
|
5 |
-
|
|
|
6 |
result = client.predict(
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
)
|
13 |
print(result)
|
|
|
14 |
return result
|
15 |
|
16 |
def get_dreamtalk(image_in, speech):
|
17 |
-
client = Client("
|
18 |
result = client.predict(
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
)
|
24 |
print(result)
|
25 |
return result['video']
|
|
|
1 |
import gradio as gr
|
2 |
+
from gradio_client import Client, handle_file
|
3 |
|
4 |
def get_speech(text, voice):
|
5 |
+
|
6 |
+
client = Client("collabora/WhisperSpeech")
|
7 |
result = client.predict(
|
8 |
+
multilingual_text=text,
|
9 |
+
speaker_audio=voice,
|
10 |
+
speaker_url="",
|
11 |
+
cps=14,
|
12 |
+
api_name="/whisper_speech_demo"
|
13 |
)
|
14 |
print(result)
|
15 |
+
|
16 |
return result
|
17 |
|
18 |
def get_dreamtalk(image_in, speech):
|
19 |
+
client = Client("fffiloni/dreamtalk")
|
20 |
result = client.predict(
|
21 |
+
audio_input=handle_file(speech),
|
22 |
+
image_path=handle_file(image_in),
|
23 |
+
emotional_style="M030_front_neutral_level1_001.mat",
|
24 |
+
api_name="/infer"
|
25 |
)
|
26 |
print(result)
|
27 |
return result['video']
|