Nuno-Tome commited on
Commit
0b78698
1 Parent(s): 605205d

project kick off

Browse files
app.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from gradio_client import Client
3
+
4
+
5
+ DEBUG_MODE = True
6
+
7
+ '''
8
+ Function to get the speech from the text
9
+ @params: text: str, voice: audio
10
+ @returns: result: speech audio
11
+ '''
12
+ def get_speech(text, voice):
13
+
14
+ '''
15
+ For now we are using external space to get the result.
16
+ In future we will use our own model to get be more independent
17
+ '''
18
+ client = Client("https://collabora-whisperspeech.hf.space/")
19
+ result = client.predict(
20
+ # str in 'Enter multilingual text📝💬' Textbox component
21
+ text,
22
+ # filepath in 'Upload or Record Speaker Audio (optional)🌬️💬' Audio component
23
+ voice,
24
+ "", # str in 'alternatively, you can paste in an audio file URL:' Textbox component
25
+ 14, # float (numeric value between 10 and 15) in 'Tempo (in characters per second)' Slider component
26
+ api_name="/whisper_speech_demo"
27
+ )
28
+ if DEBUG_MODE:
29
+ print(result)
30
+ return result
31
+
32
+
33
+
nnf_face_n_text_to_video.code-workspace ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "folders": [
3
+ {
4
+ "path": "."
5
+ }
6
+ ],
7
+ "settings": {
8
+ "workbench.colorCustomizations": {
9
+ "activityBar.activeBackground": "#3825e3",
10
+ "activityBar.background": "#3825e3",
11
+ "activityBar.foreground": "#e7e7e7",
12
+ "activityBar.inactiveForeground": "#e7e7e799",
13
+ "activityBarBadge.background": "#380c07",
14
+ "activityBarBadge.foreground": "#e7e7e7",
15
+ "commandCenter.border": "#e7e7e799",
16
+ "sash.hoverBorder": "#3825e3",
17
+ "statusBar.background": "#2918bd",
18
+ "statusBar.foreground": "#e7e7e7",
19
+ "statusBarItem.hoverBackground": "#3825e3",
20
+ "statusBarItem.remoteBackground": "#2918bd",
21
+ "statusBarItem.remoteForeground": "#e7e7e7",
22
+ "titleBar.activeBackground": "#2918bd",
23
+ "titleBar.activeForeground": "#e7e7e7",
24
+ "titleBar.inactiveBackground": "#2918bd99",
25
+ "titleBar.inactiveForeground": "#e7e7e799"
26
+ },
27
+ "peacock.color": "#2918bd"
28
+ }
29
+ }
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio
2
+ transformers
3
+ scipy