-
Notifications
You must be signed in to change notification settings - Fork 60
Add audio support to DataPack #585
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #585 +/- ##
==========================================
+ Coverage 79.78% 79.86% +0.08%
==========================================
Files 227 229 +2
Lines 16163 16239 +76
==========================================
+ Hits 12896 12970 +74
- Misses 3267 3269 +2
Continue to review full report at Codecov.
|
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.
Thanks for the PR, looks like it works OK.
Some other small suggestions:
- We are at a point where we have quite a few data samples in the
data_samples
folder. Could you add aREADME.md
in that folder? This time let's add a description of what theaudio_reader_test
folder contains. - Once we add this PR we would need to start documenting the feature, so from the start, let's consider adding a new markdown file in the
docs
folder, start to serve as a tutorial for the audio project. Then we can make a link from https://github.com/asyml/forte/wiki, and from the rootREADME.md
forte/data/readers/audio_reader.py
Outdated
""" | ||
import os | ||
from typing import Any, Iterator | ||
import soundfile |
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.
so this reader would depend on the soundfile
dependency, which means it needs to be in our core requirement. So what happens would be if we do pip install forte
and from forte.data.readers.misc_reader import xxx
, this would fail (since this is in the __init__.py
)
We need to think of a better way to place this reader. Any suggestions
This PR fixes #582.
Description of changes
soundfile
soundfile>=0.10.3
is inserted tosetup.py
anddocs/requirements.txt
main.yml
is updated withsudo apt-get install -y libsndfile1-dev
as required by soundfile for Linux.DataPack
with audio support_audio
for payload andsample_rate
for metadataAudioReader
to load audio filesTest Conducted
A unit test for
AudioReader
is added. It builds and runs an audio processing pipeline for automatic speech recognition (ASR) in order to jointly testAudioReader
andDataPack
.