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

whisperX to create transcripts #28

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

whisperX to create transcripts #28

wants to merge 14 commits into from

Conversation

JvSdv
Copy link

@JvSdv JvSdv commented Jan 3, 2023

PLEASE ONLY SUBMIT PULL REQUESTS FOR BUG FIXES OR LEGITIMATELY USEFUL ADDITIONAL FUNCTIONALITY

I know many of you are enthusiastic to help but I don't want this project to become bloated


Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Proposed Changes

  • Add transcription of videos in english using whisperx an upgrade of the original whisper, with well defined timestamsps

Additional Info

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have tested that the code works

Required:

  • By contributing to this project, you agree to the terms of the GPLv3 license, and agree to grant the project owner the right to also provide or sell this software, including your contribution, to anyone under any other license, with no compensation to you.

Copy link
Contributor

@sofiadparamo sofiadparamo left a comment

Choose a reason for hiding this comment

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

The WisperX implementation looks good to me! But I see some problems with the other files.

audio_builder.py Outdated
@@ -26,6 +27,12 @@
cloudConfig = configparser.ConfigParser()
cloudConfig.read('cloud_service_settings.ini')

# Get the video file name and create the output folder based on the original video file name
originalVideoFile = os.path.abspath(batchConfig['SETTINGS']['original_video_file_path'].strip("\""))
Copy link
Contributor

Choose a reason for hiding this comment

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

I see some calls to the settings file with original_video_file_path, however, the config file remains unchanged, I think that creating a commit with these new settings and a default value would avoid some unexpected behavior on users that do not look into the code

Copy link
Author

Choose a reason for hiding this comment

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

I think it's best to remove this for now

main.py Outdated
@@ -72,6 +72,11 @@
originalVideoFile = os.path.abspath(batchConfig['SETTINGS']['original_video_file_path'].strip("\""))
srtFile = os.path.abspath(batchConfig['SETTINGS']['srt_file_path'].strip("\""))

# Create the output folder based on the original video file name
fileName = os.path.basename(originalVideoFile).split(".")[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this the same as the code in audio_builder.py?

Also, there's already some code to handle the creation of output folders in Line 479 of the main file, in my opinion, moving this implementation there (or replacing the existing one) would be a better fit for this code.

@ThioJoe
Copy link
Owner

ThioJoe commented Jan 4, 2023

Instead of adding this to requirements.txt, I'll probably want to implement it optionally somehow. Maybe add a message to be displayed when the script is run saying how to install it.
Mostly because it would require downloading big files like for the model, and also not everyone would have a GPU that would even work with it.

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.

3 participants