changes main.py & test_srt.py issue #11 - #12
Conversation
|
Hey @hirendra84 thank you for you PR. Sorry for a late reply. I'll check it and come back here to see if I can merge it. |
|
Thanks for picking this up, @hirendra84. Direction is right, but this can't merge as-is — I think you may have missed a commit. The diff only touches main.py and tests/test_srt.py. generate_vtt_files() doesn't exist yet: langswap/translation_pipeline.py:187 still defines generate_srt_files() and still writes SRT (numbered cues, comma timestamps, .srt filenames). So main.py raises AttributeError at the last stage and the new test fails. langswap/api.py:132, langswap/api.py:193 and gradio_demo.py:141 also still call the old name. The point of #4 is the speaker tags, not the rename — that's the whole reason VTT is worth moving to. The data is already there: TranslatedTextedSegment.speaker (langswap/pipeline_models/models.py:34) is populated by the ASR clients, it's just never written out. So the change belongs in generate_srt_files():
One note on the test: asserting |
feat(subtitles): migrate subtitle generation from SRT to WebVTT