forked from akshatat777/SiLT-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (36 loc) · 1.07 KB
/
Copy pathmain.py
File metadata and controls
41 lines (36 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from text2sign import words_to_video
from audio_processing import load_mic
from audio_processing import text_to_speech
from signtotext import sign_to_text
from video2text_joint import videototext
import os, sys, subprocess
def open_file(filename):
if sys.platform == "win32":
os.startfile(filename)
else:
opener = "open" if sys.platform == "darwin" else "xdg-open"
subprocess.call([opener, filename])
def audiotosign():
confirm = 'n'
while confirm == 'n':
text = load_mic()
print("We think you said this: " + text)
confirm = input("Confirm? (y/n) ")
video_name = words_to_video(text)
open_file(video_name)
return video_name
#audiotosign()
def texttosign():
text = input("What do you want in sign? ")
video_name = words_to_video(text)
open_file(video_name)
return video_name
def signtotext():
prediction = videototext()
return prediction
#print(signtotext())
def signtoaudio():
prediction = videototext()
text_to_speech(prediction, "signs")
open_file("signs.mp3")
signtoaudio()