Skip to content

add loudness_per_window method#1

Open
DBraun wants to merge 2 commits intoiver56:mainfrom
DBraun:feature/loudness.window
Open

add loudness_per_window method#1
DBraun wants to merge 2 commits intoiver56:mainfrom
DBraun:feature/loudness.window

Conversation

@DBraun
Copy link

@DBraun DBraun commented Nov 20, 2025

Hello, thanks for this project!

What do you think of this new feature:

# Get loudness per window (e.g., to analyze loudness over time)
lufs_per_window = loudness.loudness_per_window(audio, sr, window_duration_sec=0.5)
print(f"Windows: {lufs_per_window}")

# Calculate percentage above threshold
percentage_loud = (lufs_per_window > -30).mean() * 100
print(f"{percentage_loud:.1f}% of windows are above -30 LUFS")

@iver56
Copy link
Owner

iver56 commented Dec 26, 2025

Thanks for the appreciation, and for the PR. This definitely looks like a useful feature! Unfortunately, I haven't had sufficient time to look into this lately

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.

2 participants