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

Make NFA subtitles stay until end of video #7189

Merged
merged 2 commits into from
Aug 9, 2023
Merged

Conversation

erastorgueva-nv
Copy link
Collaborator

What does this PR do ?

Write an extra line at the end of the ASS files which will ensure the subtitles of the final segment are visible until the end of the video. Without this, it means that if we create an MP4 file from an audio file by writing the subtitles on a plain background, at the end of the video we are always left with a blank screen, which is not a nice UX as the text feels to disappear very suddenly.

Collection: tools/nemo_forced_aligner.py

Changelog

  • extra code to get the duration of the audio file and write the extra lines at the end of the ASS files.

Usage

No change in usage.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • [ N/A ] Did you write any new necessary tests?
  • [ N/A ] Did you add or update any necessary documentation?
  • [ N/A ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

@erastorgueva-nv erastorgueva-nv force-pushed the nfa_subtitles_stay_at_end branch from 60f98c7 to 93ba738 Compare August 8, 2023 23:47
titu1994
titu1994 previously approved these changes Aug 9, 2023
Copy link
Collaborator

@titu1994 titu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good !

@titu1994 titu1994 merged commit 5cffd9a into main Aug 9, 2023
@titu1994 titu1994 deleted the nfa_subtitles_stay_at_end branch August 9, 2023 04:32
dorotat-nv pushed a commit to dorotat-nv/NeMo that referenced this pull request Aug 24, 2023
* write extra subtitles line to make sure final subtitles are visible until end of video

Signed-off-by: Elena Rastorgueva <[email protected]>

* add some comments for final subtitle line logic

Signed-off-by: Elena Rastorgueva <[email protected]>

---------

Signed-off-by: Elena Rastorgueva <[email protected]>
Signed-off-by: dorotat <[email protected]>
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
* write extra subtitles line to make sure final subtitles are visible until end of video

Signed-off-by: Elena Rastorgueva <[email protected]>

* add some comments for final subtitle line logic

Signed-off-by: Elena Rastorgueva <[email protected]>

---------

Signed-off-by: Elena Rastorgueva <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants