audio
audio copied to clipboard
Add example codes for documentation
📚 Documentation
I have observed that Example codes are missing from Documentation for the below mentioned Classes from torchaudio, Can I Raise PR for it
Group A
- [x] Spectrogram PR:https://github.com/pytorch/audio/pull/1566
- [x] GriffinLim PR:https://github.com/pytorch/audio/pull/1671/
- [ ] AmplitudeToDB
- [ ] MelScale
- [ ] InverseMelScale
- [ ] MFCC
- [x] MuLawEncoding PR:https://github.com/pytorch/audio/pull/1586
- [x] MuLawDecoding PR:https://github.com/pytorch/audio/pull/1684
- [ ] SpectralCentroid
Group B
- [x] Resample PR:https://github.com/pytorch/audio/pull/1644
- [x] ComplexNorm PR:https://github.com/pytorch/audio/pull/1658
- [x] ComputeDeltas
- [ ] TimeStretch
- [x] Fade
Group C
- [ ] FrequencyMasking
- [ ] TimeMasking
- [x] Vol
- [x] SlidingWindowCmn
- [x] Vad
Hi @harishsdev
Yes, this will be a great addition. Feel free to add PRs. However, please split PRs for each class, (make one PR per class) so that it is easier to review.
Also, some of them are covered in tutorial, so please have a look it as well. https://pytorch.org/tutorials/beginner/audio_preprocessing_tutorial.html#feature-extractions
I will make this issue open for contribution.
I am working on Group A
@mthrok please help to review
After following the instructions given in contributing.md for development and installation, when I am trying to build docs locally I am getting this error after running make html
Running Sphinx v2.4.4
checking for /home/vivek_kumar/OpenSource/audio/docs/source/refs.bib in bibtex cache... not found
parsing bibtex file /home/vivek_kumar/OpenSource/audio/docs/source/refs.bib... parsed 10 entries
loading intersphinx inventory from https://docs.python.org/objects.inv...
loading intersphinx inventory from https://docs.scipy.org/doc/numpy/objects.inv...
loading intersphinx inventory from https://pytorch.org/docs/stable/objects.inv...
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
intersphinx inventory has moved: https://docs.scipy.org/doc/numpy/objects.inv -> https://numpy.org/doc/stable/objects.inv
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 12 source files that are out of date
updating environment: [new config] 12 added, 0 changed, 0 removed
reading sources... [ 8%] backend
reading sources... [ 16%] compliance.kaldi
reading sources... [ 25%] datasets
reading sources... [ 33%] functional
reading sources... [ 41%] index
reading sources... [ 50%] kaldi_io
reading sources... [ 58%] models
reading sources... [ 66%] rnnt_loss
reading sources... [ 75%] sox_effects
reading sources... [ 83%] torchaudio
reading sources... [ 91%] transforms
reading sources... [100%] utils
Warning, treated as error:
autodoc: failed to import class 'backend.common.AudioMetaData' from module 'torchaudio'; the following exception was raised:
No module named 'torchaudio'
Makefile:27: recipe for target 'html' failed
make: *** [html] Error 2
@mthrok please help me out to overcome this error!
Can I start working on Group B?
Hi @radioactive11! Sure, feel free to create a PR for each class in Group B.
@nateanl Thank you for letting me work on this issue. I am new to the repo. Should I add an example like this one?
@nateanl Thank you for letting me work on this issue. I am new to the repo. Should I add an example like this one?
Yes, exactly. You can see @harishsdev's #1566 as an example.
Hey Can I work on this issue?
Hi @chiragoel
Sure go ahead.
Hi there - it looks like Group C is still open, so I thought I'd work on that.
Also note that FrequencyMasking and TimeMasking from Group C already have examples, but are still unchecked in the original post of this PR (I don't have access to check them off.)
I believe Group C transforms should all have examples now, with the last two pending review.
@harishsdev Just checking if you were still planning on finishing up examples for Group A. If not, I'd be happy to work on those to help nudge this issue closer to being closed. :) I will give it a week for your response before working on Group A, in case you do plan to work on them.
If my tally is correct, the following transformations still need examples for Group A:
AmplitudeToDBMelScaleInverseMelScaleMFCC
It seems that SpectralCentroid from Group A is currently unchecked in the first post of this issue, but I see that an example has already been added.
Thanks!
Per my last post here, I am starting work on the remaining examples for Group A, beginning with AmplitudeToDB.
Hi! It would be great to get feedback on the below:
We are getting close to completing all of the examples Harish originally proposed in this issue. However, there are some torchaudio transforms in the source code which are not in the original list here (perhaps some were added later). Some of these transforms also do not have examples yet, for instance: LFCC and SoudenMVDR.
Would it make sense to add a new group for these transforms that are not already listed in this issue, or create a new issue, or something else? Has a full tally of examples been done already or would this be a helpful addition?
Hi @ravimakhija, thanks for working on group A. I think adding a new group for the rest of transforms modules is a good idea.
Sounds good - I don't think I have permissions to edit the original post, so I will plan to add a new group as a new comment.
Hi All-
After tallying the remaining transform examples using the main branch source code (as of commit 533f87), I have the following three updates:
- All of the examples in group A, group B, and group C except for one (
ComputeDeltas) are now included in the main branch. Hence, they can be checked off in Harish's original post (by anyone who has the permissions to do so). - The
ComputeDeltastransform is checked off in Harish's original post, but it has not been merged yet (please see PR #2197). - There are six transforms that still need examples added, for which I am adding group D below. I plan to start working on adding these from the top down (e.g. starting with LFCC).
Group D:
- [x] LFCC
- [x] Loudness
- [ ] MVDR
- [ ] SoudenMVDR
- [ ] RTFMVDR
- [ ] PSD