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

Allow usage of ffmpeg audio filters #1047

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

acastin
Copy link

@acastin acastin commented Feb 14, 2025

Allow users to use ffmpeg audio filters to clean up or normalize audio data, with a link to the official documentation and some examples

Allow users to use ffmpeg audio filters to clean up or normalize audio data, with a link to the official documentation and some examples
@Barabazs
Copy link
Collaborator

My 2 cents: this should be part of the users workflow, outside of the context of WhisperX.

  1. it opens the door to shell/binary exploits
  2. additional dependency headaches since ffmpeg isn't shipped with WhisperX
  3. shell errors/exceptions are hard to handle and will result in a subpar experience

@NielsMayer
Copy link

@acastin -- what kind of results and improvements are you seeing when employing, e.g., "EBU R 128" or "dynaudnorm" ? Is there a reason regular whisper doesn't employ this technique? Do any other variants?

ffmpeg_audio_filters: Optional[str]
        Apply ffmpeg audio filters (https://ffmpeg.org/ffmpeg-filters.html)
        "ebur128" to normalize loudness across the audio based on EBU R 128
        "dynaudnorm=p=0.5:s=5:g=15" to normalize volume dynamically over short windows

Thanks for pointing out this feature of ffmpeg... looks quite useful!

@clort81
Copy link

clort81 commented Feb 27, 2025

As a rule: Stick to Unix Philosophy for maintainability -- Keep scope, bindings, dependencies limited. Yes, people are forgetting this wisdom, which is why I write it again and again. 'App thinking' is a commerce model. Not applicable in FOSS tool as here.
This is what scripting is for. Tool pipelines in text, graphics, whatever.
Btw 'normalize dynamically' is called compression in music engineering.

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