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

Update captions.py #413

Merged
merged 3 commits into from
Jan 13, 2025
Merged

Update captions.py #413

merged 3 commits into from
Jan 13, 2025

Conversation

amspsingh04
Copy link
Contributor

i have added a function generate_txt_captions which can be used to generate a text file from the srt file of captions that is generated before this

an example of its working on my device (this is just a 10 sec chunk of the 1min video, it worked perfectly for the entire length, and for another 10 videos as well of 30 min + length, would be happy to share another working example if needed)

video url - https://www.youtube.com/watch?v=MpcQOSE3vM4
srt content generated:

1
00:00:00,420 --> 00:00:05,220
hello everybody

2
00:00:02,700 --> 00:00:07,020
welcome to a demo video of my real-time

3
00:00:05,220 --> 00:00:10,139
transcription library that should

txt content generated:
hello everybody welcome to a demo video of my real-time transcription library that should

i am not well versed with parsing and using XML content, that is why i have used regex on the srt output.

JuanBindez and others added 2 commits January 9, 2025 20:45
I have added a function generate_txt_captions which can be used to generate a text file from the srt file of captions that is generated before this
@JuanBindez JuanBindez changed the base branch from main to dev January 12, 2025 18:34
@JuanBindez JuanBindez merged commit 1e3863a into JuanBindez:dev Jan 13, 2025
JuanBindez added a commit that referenced this pull request Jan 13, 2025
JuanBindez added a commit that referenced this pull request Jan 14, 2025
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