-
Notifications
You must be signed in to change notification settings - Fork 0
/
TranscriberContext.py
30 lines (24 loc) · 1.27 KB
/
TranscriberContext.py
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
class TranscriberContext:
# We will need to clean these fields
def __init__(self, url, inputPath=None, videoPath=None, audioPath=None, transcribeText=None):
self.url = url
self.inputPath = inputPath
self.videoPath = videoPath
self.audioPath = audioPath
self.transcribeText = transcribeText
@staticmethod
def getContextWithUrl():
return TranscriberContext("https://www.youtube.com/watch?v=z9w6tO4d90U", None, None, None, None)
@staticmethod
def getContextWithVideo():
return TranscriberContext("https://www.youtube.com/watch?v=z9w6tO4d90U", "./export/video.mp4", None, None, None)
@staticmethod
def getContextWithVideoAndAudio():
return TranscriberContext("https://www.youtube.com/watch?v=z9w6tO4d90U", "./export/video.mp4", "./export/video.mp4", "./export/audio.mp3", None)
@staticmethod
def getContextWithInputAudio():
return TranscriberContext("https://www.youtube.com/watch?v=z9w6tO4d90U", "./export/audio.mp3", None, None, None)
@staticmethod
def getContextWithFull():
# Add Text went convert for the first time
return TranscriberContext("https://www.youtube.com/watch?v=z9w6tO4d90U", "./export/video.mp4", "./export/video.mp3", "./export/audio.mp4", None)