Rejiggered imports to require fewer third-party libraries if certain features aren't used #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am trying to use this library for fuzzy audio comparison in a limited environment where it is ideal to use as few third-party libraries as possible. Since this library only uses pydub for audio decoding, and only uses mysql if you use the mysql database, and I only need to use wav files and created my own memory backed database, I modified the library to not require those libraries if you do not want to use those features, which I imagine could be a fairly common occurrence.
I also fixed a bug that would cause an exception if you loaded a 24-bit wav file, because it would have audiofile be a numpy array, instead of an AudioSegment, and so would be unable to get
audiofile.frame_rate
. Replaced withfs
, which appears to have been created for this purpose.