Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve subtitle merge algorithm #5

Open
devmaxxing opened this issue Dec 26, 2021 · 8 comments
Open

Improve subtitle merge algorithm #5

devmaxxing opened this issue Dec 26, 2021 · 8 comments

Comments

@devmaxxing
Copy link
Owner

The algorithm currently merges 2 subtitles by picking the one with the highest average confidence.
Ideally, all characters with high confidence should be used if there is no conflict in their positions e.g.

If merging a (99) b (99) c (99) and a (99) b (99) a (98) c (99), the result should be abac instead of abc

@obaidabit
Copy link

Is this the reason why the subtitle appears wrong ( flipped and sometimes in the wrong order)?

@devmaxxing
Copy link
Owner Author

@obedabit do you have an example?

@obaidabit
Copy link

@oliverfei Yes I do, here is an example, I have the following photo it has two line sentences, and the output is wrong on one line, it should be two lines and the last sentence should be the first.

image

output:

3
00:00:51,416 --> 00:00:55,583
right in front of you, of course you'd be depressed. No, if someone else kissed the person you liked

@devmaxxing
Copy link
Owner Author

Ah ok. That's cause the library doesn't account the multiline scenario at the moment which is unrelated to this issue.

@obaidabit
Copy link

obaidabit commented Nov 25, 2022

so should we make an issue for It or you will fix it without one?

@devmaxxing
Copy link
Owner Author

I pushed something if you want to try it out

@obaidabit
Copy link

It is ok, amazing work

@woojh3690
Copy link

The subtitle merging algorithm used by this library is too bad for subtitles that appear as if they were typed rather than appearing in a single frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants