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

Handle Varying Sample Rates #113

Open
chadlagore opened this issue May 14, 2018 · 1 comment
Open

Handle Varying Sample Rates #113

chadlagore opened this issue May 14, 2018 · 1 comment

Comments

@chadlagore
Copy link
Collaborator

When a user passes in a folder of audio files, minutes loads all of them in, concatenates them, then reshapes them into phrases. There is an edge case where some of the audio in the folder has a different sample rate. We need to handle that case or throw errors.

minutes/minutes/audio.py

Lines 25 to 27 in cf7deaa

# Set rate as mode of rates for now.
# TODO: Resample audio?
self.rate = stats.mode(rates)[0][0]

@chadlagore
Copy link
Collaborator Author

Elsewhere...

If a user reads in audio files with different sample rates, our observation lengths begin to differ, and we cannot learn. One fix for this is to resample the audio to a common rate (say 44000, or some user specified number).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant