Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@RapDoodle
Copy link

I encountered a similar issue described in #28, but my videos are in English. I suspect it is related to the variable framerates of the video's recording device.

After some debugging, it turns out the output .wav audio file is out of sync with the original video. Thus, I added the -async 1 option to ffmpeg and it fixed the issue.

Also, becauseasync is a reversed keyword in Python, I replaced the call to ffmpeg with subprocess.run.

@what-the-diff
Copy link

what-the-diff bot commented Feb 18, 2023

  • The ffmpeg module was replaced with the subprocess module due to conflicting argument name "async"
  • A new function get_audio() is added which extracts audio from a video file and returns its path
  • In main(), if --extract-audio flag is set, then extract audio using get_audio() instead of calling transcribe().

@m1guelpf
Copy link
Owner

@RapDoodle Can you update this to use the newer aresample option instead? I believe this will also let us keep using ffmpeg directly

@francogrex
Copy link

francogrex commented May 14, 2024

  • The ffmpeg module was replaced with the subprocess module due to conflicting argument name "async"
  • A new function get_audio() is added which extracts audio from a video file and returns its path
  • In main(), if --extract-audio flag is set, then extract audio using get_audio() instead of calling transcribe().

[what-the-diff] what a lovely but completely useless chap you are 😉. Your contribution made no sense to this thread. Anyway, @RapDoodle I'm afraid the de-synchronization still happens despite the changes!

@davejab
Copy link

davejab commented Jun 7, 2024

Following the discussion here openai/whisper#1888 I was able to greatly improve accuracy by adding the --word_timestamps True flag to the transcribe call.

GitHub
Hail I'm trying to translate this German movie into English or at least transcribing. I see that the translation or transcribing are truly impressive, nothing to complain. And somehow somewhat, the...

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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.