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

Adds TXT transcript, --format option, handle input with special chars #35

Merged
merged 5 commits into from
Sep 9, 2021

Conversation

shasheene
Copy link
Contributor

@shasheene shasheene commented Sep 9, 2021

See constituent commits.

Fixes #33

Fixes an bug introduced in a prior commit where the line_count increment logic
changed and the line_count no longer begins at 1 as intended.
Reduces duplication by moving the code used to generate of the SRT/VTT
timestamp strings used for each subtitle to its own function.

Reducing the unnecessary duplication reduces the risk of errors being
introduced.

Ref abhirooptalasila#33
Replaces the --vtt argument that is used to switch between creating an SRT file
or a VTT file, to instead always create both formats by default and allow the
user to specify a subset of formats using the --format argument introduced in
this commit.

As discussed in abhirooptalasila#33, it is the inference part that takes the bulk of the
execution time and the output subtitle file format doesn't take much time and
uses very little disk space then rerunning the entire inference again just to
get a VTT file is inefficient, so it makes more sense just to create the VTT
and SRT by default.

Fixes abhirooptalasila#33
Adds the ability to create text file containing a simple transcript of inferred
audio, in addition to the subtitle file formats.
Improves the handling of filenames which contain special characters by not
processing the ffmpeg command using a shell, and passing the arguments in using
a Python list.

Note: The use of the old 'subprocess.call()' API here is unchanged. A future
commit may switch to the more modern subprocess.run().
@abhirooptalasila abhirooptalasila merged commit 47ddcf1 into abhirooptalasila:master Sep 9, 2021
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.

Create vtt, srt, txt files by default (drop the --vtt option)
2 participants