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

Fix LoudnessNormalization #1029

Merged
merged 2 commits into from
Apr 15, 2023
Merged

Fix LoudnessNormalization #1029

merged 2 commits into from
Apr 15, 2023

Conversation

lifeiteng
Copy link
Contributor

No description provided.

@lifeiteng
Copy link
Contributor Author

@desh2608 can you take a look

) -> np.ndarray:
if torch.is_tensor(samples):
samples = samples.cpu().numpy()
augmented = normalize_loudness(samples, **asdict(self))
augmented = normalize_loudness(
samples, **asdict(self), sampling_rate=sampling_rate
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can replace the asdict(self) with target=self.target.

@pzelasko
Copy link
Collaborator

Thanks! Please address Desh's comment and LGTM

@pzelasko pzelasko added this to the v1.14 milestone Apr 14, 2023
@desh2608 desh2608 merged commit 9b60b51 into lhotse-speech:master Apr 15, 2023
@lifeiteng lifeiteng deleted the loudness branch March 25, 2024 14:09
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