MCPcopy Create free account
hub / github.com/smacke/ffsubsync / get_srt_pipe_maker

Function get_srt_pipe_maker

ffsubsync/ffsubsync.py:118–128  ·  view source on GitHub ↗
(
    args: argparse.Namespace, srtin: Optional[str]
)

Source from the content-addressed store, hash-verified

116
117
118def get_srt_pipe_maker(
119 args: argparse.Namespace, srtin: Optional[str]
120) -> Callable[[Optional[float]], Union[Pipeline, Callable[[float], Pipeline]]]:
121 if srtin is None:
122 srtin_format = "srt"
123 else:
124 srtin_format = os.path.splitext(srtin)[-1][1:]
125 parser = make_subtitle_parser(fmt=srtin_format, caching=True, **args.__dict__)
126 return lambda scale_factor: make_subtitle_speech_pipeline(
127 **override(args, scale_factor=scale_factor, parser=parser)
128 )
129
130
131def get_framerate_ratios_to_try(args: argparse.Namespace) -> List[Optional[float]]:

Callers 1

try_syncFunction · 0.85

Calls 3

make_subtitle_parserFunction · 0.90
overrideFunction · 0.85

Tested by

no test coverage detected