-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
Enable saving subtitles as .txt file #72
base: main
Are you sure you want to change the base?
Conversation
PR Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a member of this repo, but got a small suggestion anyway.
Otherwise looks good! Hopefully the actual maintainer will see these PRs soon. If not, maybe fork time?
@@ -18,6 +18,8 @@ def main(): | |||
default=".", help="directory to save the outputs") | |||
parser.add_argument("--output_srt", type=str2bool, default=False, | |||
help="whether to output the .srt file along with the video files") | |||
parser.add_argument("--output_txt", type=str2bool, default=False, | |||
help="whether to save the subtitles in a txt file") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this would read better?
help="whether to save the subtitles in a txt file") | |
help="whether to also output the subtitles as a .txt file") |
.....the existing description implies that a .txt
file is generated instead of other outputs, which isn't the case I note from reading the code.
TLDR
This PR introduces an option (--output_txt) to save subtitles directly into text files, facilitating research and other text-based analyses. This feature caters to users who prefer working with plain text for easier manipulation and integration with various tools.
Key Changes
Added --output_txt CLI argument.
Implemented text file saving in the get_subtitles function.
Motivation
Providing subtitles in txt format supports diverse applications, including NLP research, educational content creation, and media processing. It simplifies workflows by offering a straightforward, editable format.
Usage
Enable text file output with --output_txt true when running auto_subtitle.
Testing
The feature has been tested across multiple video inputs to ensure reliable text output alongside existing .srt file generation.
This streamlined functionality aims to enhance the tool's versatility for all users.