-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
update installation of libsndfile, add unitest of soundfile #177
Conversation
a38265e
to
13e3cf8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM++
deep_speech_2/tests/test_setup.py
Outdated
file = 'test.wav' | ||
sf.write(file, data, 44100, format='WAV', subtype='FLOAT') | ||
read, fs = sf.read(file) | ||
assert np.all(read == data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use self.assertEqual
or self.assertTrue
instead of assert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
deep_speech_2/tests/test_setup.py
Outdated
sf.write(file, data, 44100, format='WAV', subtype='FLOAT') | ||
read, fs = sf.read(file) | ||
assert np.all(read == data) | ||
assert fs == 44100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use self.assertEqual
instead of assert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
ctypes.util.find_library()
只在系统路径中查找libsndfile库。soundfile.read/write
的单测。