From 2f799403fa2ca9e41a370e9c69b801d05644abd8 Mon Sep 17 00:00:00 2001 From: Jason Lian Date: Mon, 29 Jul 2019 13:14:10 -0700 Subject: [PATCH 1/5] more --- README.md | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c60b2662f7..2f4b1c9e21 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,15 @@ torchaudio: an audio library for PyTorch [![Build Status](https://travis-ci.org/pytorch/audio.svg?branch=master)](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,22 +72,25 @@ 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. +With torchaudio being a machine learning library and built on top of PyTorch, +torchaudio is standardized around the following naming conventions. In particular, +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. + +* `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. * Spectrogram: (channel, time) -> (channel, freq, time) * AmplitudeToDB: (channel, freq, time) -> (channel, freq, time) From 33cc97190f1fb6803754bae4049e6ccea7e45a39 Mon Sep 17 00:00:00 2001 From: Jason Lian Date: Mon, 29 Jul 2019 13:50:16 -0700 Subject: [PATCH 2/5] apply feedback: backtick --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2f4b1c9e21..3ed9af7675 100644 --- a/README.md +++ b/README.md @@ -92,11 +92,11 @@ dimension (when applicable). This makes it consistent with PyTorch's dimensions. Transforms expect the following dimensions. -* 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) +* `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) From 32a1891a359c4535a6d79284bba90fdfb29c620b Mon Sep 17 00:00:00 2001 From: Jason Lian Date: Mon, 29 Jul 2019 13:53:42 -0700 Subject: [PATCH 3/5] apply feedback: explain --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 3ed9af7675..2f1573dc08 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,9 @@ With torchaudio being a machine learning library and built on top of PyTorch, torchaudio is standardized around the following naming conventions. In particular, 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. +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) * `sample_rate`: the rate of audio dimensions (samples per second) From 106af5093b33557117168947241e47ad7d429d43 Mon Sep 17 00:00:00 2001 From: Jason Lian Date: Tue, 30 Jul 2019 06:45:02 -0700 Subject: [PATCH 4/5] apply feedback: comma --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f1573dc08..2b625d6a42 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ torchaudio is standardized around the following naming conventions. In particula 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. 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 +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) From 1b8dab99dc562b1d29fe091a8ad808b66739b9eb Mon Sep 17 00:00:00 2001 From: Jason Lian Date: Tue, 30 Jul 2019 06:46:44 -0700 Subject: [PATCH 5/5] apply feedback: contributing --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 2b625d6a42..1a21b49a97 100644 --- a/README.md +++ b/README.md @@ -103,3 +103,16 @@ Transforms expect the following dimensions. * `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.