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

[BUG]: There is a logic problem with volume normalization in Emilia's audio preprocessing #406

Open
Hit1ron opened this issue Mar 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Hit1ron
Copy link

Hit1ron commented Mar 3, 2025

After performing a volume gain, an amplitude normalization is performed again, which will cause the volume gain to fail.

# Normalize volume and limit gain range to between -3 and 3
normalized_audio = audio.apply_gain(min(max(gain, -3), 3))

waveform = np.array(normalized_audio.get_array_of_samples(), dtype=np.float32)
max_amplitude = np.max(np.abs(waveform))
waveform /= max_amplitude  # Normalize
@Hit1ron Hit1ron added the bug Something isn't working label Mar 3, 2025
@Hit1ron
Copy link
Author

Hit1ron commented Mar 3, 2025

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant