Repository navigation
feat(converters): add SubtitleToDocument for SRT and WebVTT - #13404
ninglinLiu wants to merge 2 commits into
Conversation
Fixes deepset-ai#13395 Stdlib-only converter modeled on TextFileToDocument. Strips cue numbers, timing lines, NOTE blocks and inline tags; groups cues into Documents with start_time/end_time metadata. MultiFileConverter routing left unchanged.
|
@ninglinLiu is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
|
|
Hi @ninglinLiu, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
Related issue
Fixes #13395
Summary
Adds a stdlib-only
SubtitleToDocumentconverter (modeled onTextFileToDocument) that:.srtand.vttNOTE/STYLE/REGIONblocks, and common inline tagscues_per_document(default 10;None= one Document per file)start_time/end_time(float seconds) on each Document from the first/last cue in the groupMultiFileConverterrouting is intentionally unchanged (as discussed in the issue) so existing.srt→TextFileToDocumentbehavior stays intact.Verification
pytest test/components/converters/test_subtitle_to_document.py -q # 6 passed