MCPcopy Index your code
hub / github.com/modelscope/FunClip / __init__

Method __init__

funclip/utils/subtitle_utils.py:30–36  ·  view source on GitHub ↗
(self, text, timestamp, offset=0)

Source from the content-addressed store, hash-verified

28
29class Text2SRT():
30 def __init__(self, text, timestamp, offset=0):
31 self.token_list = text
32 self.timestamp = timestamp
33 start, end = timestamp[0][0] - offset, timestamp[-1][1] - offset
34 self.start_sec, self.end_sec = start, end
35 self.start_time = time_convert(start)
36 self.end_time = time_convert(end)
37 def text(self):
38 if isinstance(self.token_list, str):
39 return self.token_list.rstrip("、。,")

Callers

nothing calls this directly

Calls 1

time_convertFunction · 0.85

Tested by

no test coverage detected