-
Notifications
You must be signed in to change notification settings - Fork 739
README updates #180
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
Merged
Merged
README updates #180
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,15 @@ torchaudio: an audio library for PyTorch | |
|
|
||
| [](https://travis-ci.org/pytorch/audio) | ||
|
|
||
| The aim of torchaudio is to apply [PyTorch](https://github.com/pytorch/pytorch) to | ||
| the audio domain. By supporting PyTorch, torchaudio will follow the same philosophy | ||
| of providing strong GPU acceleration, having a focus on trainable features through | ||
| the autograd system, and having consistent style (tensor names and dimension names). | ||
| Therefore, it will be primarily a machine learning library and not a general signal | ||
| processing library. The benefits of Pytorch will be seen in torchaudio through | ||
| having all the computations be through Pytorch operations which makes it easy | ||
| to use and feel like a natural extension. | ||
|
|
||
| - [Support audio I/O (Load files, Save files)](http://pytorch.org/audio/) | ||
| - Load the following formats into a torch Tensor | ||
| - mp3, wav, aac, ogg, flac, avr, cdda, cvs/vms, | ||
|
|
@@ -63,28 +72,47 @@ API Reference is located here: http://pytorch.org/audio/ | |
| Conventions | ||
| ----------- | ||
|
|
||
| Torchaudio is standardized around the following naming conventions. | ||
|
|
||
| * waveform: a tensor of audio samples with dimensions (channel, time) | ||
| * sample_rate: the rate of audio dimensions (samples per second) | ||
| * specgram: a tensor of spectrogram with dimensions (channel, freq, time) | ||
| * mel_specgram: a mel spectrogram with dimensions (channel, mel, time) | ||
| * hop_length: the number of samples between the starts of consecutive frames | ||
| * n_fft: the number of Fourier bins | ||
| * n_mel, n_mfcc: the number of mel and MFCC bins | ||
| * n_freq: the number of bins in a linear spectrogram | ||
| * min_freq: the lowest frequency of the lowest band in a spectrogram | ||
| * max_freq: the highest frequency of the highest band in a spectrogram | ||
| * win_length: the length of the STFT window | ||
| * window_fn: for functions that creates windows e.g. torch.hann_window | ||
|
|
||
| Transforms expect the following dimensions. In particular, the input of all transforms and functions assumes channel first. | ||
|
|
||
| * Spectrogram: (channel, time) -> (channel, freq, time) | ||
| * AmplitudeToDB: (channel, freq, time) -> (channel, freq, time) | ||
| * MelScale: (channel, time) -> (channel, mel, time) | ||
| * MelSpectrogram: (channel, time) -> (channel, mel, time) | ||
| * MFCC: (channel, time) -> (channel, mfcc, time) | ||
| * MuLawEncode: (channel, time) -> (channel, time) | ||
| * MuLawDecode: (channel, time) -> (channel, time) | ||
| * Resample: (channel, time) -> (channel, time) | ||
| With torchaudio being a machine learning library and built on top of PyTorch, | ||
| torchaudio is standardized around the following naming conventions. In particular, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd remove "In particular" here. |
||
| tensors are assumed to have channel as the first dimension and time as the last | ||
| dimension (when applicable). This makes it consistent with PyTorch's dimensions. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add a quick mention why we are consistent with PyTorch. |
||
| For size names, the prefix `n_` is used (e.g. "a tensor of size (`n_freq`, `n_mel`)") | ||
| whereas dimension names do not have this prefix (e.g. "a tensor of | ||
| dimension (channel, time)") | ||
|
|
||
| * `waveform`: a tensor of audio samples with dimensions (channel, time) | ||
jamarshon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * `sample_rate`: the rate of audio dimensions (samples per second) | ||
| * `specgram`: a tensor of spectrogram with dimensions (channel, freq, time) | ||
| * `mel_specgram`: a mel spectrogram with dimensions (channel, mel, time) | ||
| * `hop_length`: the number of samples between the starts of consecutive frames | ||
| * `n_fft`: the number of Fourier bins | ||
| * `n_mel`, `n_mfcc`: the number of mel and MFCC bins | ||
| * `n_freq`: the number of bins in a linear spectrogram | ||
| * `min_freq`: the lowest frequency of the lowest band in a spectrogram | ||
| * `max_freq`: the highest frequency of the highest band in a spectrogram | ||
| * `win_length`: the length of the STFT window | ||
| * `window_fn`: for functions that creates windows e.g. torch.hann_window | ||
|
|
||
| Transforms expect the following dimensions. | ||
jamarshon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| * `Spectrogram`: (channel, time) -> (channel, freq, time) | ||
| * `AmplitudeToDB`: (channel, freq, time) -> (channel, freq, time) | ||
| * `MelScale`: (channel, time) -> (channel, mel, time) | ||
| * `MelSpectrogram`: (channel, time) -> (channel, mel, time) | ||
| * `MFCC`: (channel, time) -> (channel, mfcc, time) | ||
| * `MuLawEncode`: (channel, time) -> (channel, time) | ||
| * `MuLawDecode`: (channel, time) -> (channel, time) | ||
| * `Resample`: (channel, time) -> (channel, time) | ||
|
|
||
| Contributing Guidelines | ||
| ----------------------- | ||
|
|
||
| Please let us know if you encounter a bug by filing an [issue](https://github.com/pytorch/audio/issues). | ||
|
|
||
| We appreciate all contributions. If you are planning to contribute back | ||
| bug-fixes, please do so without any further discussion. | ||
|
|
||
| If you plan to contribute new features, utility functions or extensions to the | ||
| core, please first open an issue and discuss the feature with us. Sending a PR | ||
| without discussion might end up resulting in a rejected PR, because we might be | ||
| taking the core in a different direction than you might be aware of. | ||
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Let's use present tense.