torchfsdd


Nametorchfsdd JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/eonu/torch-fsdd
SummaryA utility for wrapping the Free Spoken Digit Dataset into PyTorch-ready data set splits.
upload_time2022-12-27 20:40:51
maintainer
docs_urlNone
authorEdwin Onuonga
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">
  TorchFSDD
</h1>

<p align="center">
  <em>A utility for wrapping the Free Spoken Digit Dataset into PyTorch-ready data set splits.</em>
</p>

<p align="center">
  <a href="https://pypi.org/project/torchfsdd">
    <img src="https://img.shields.io/pypi/v/torchfsdd?style=flat-square" alt="PyPI"/>
  </a>
  <a href="https://pypi.org/project/torchfsdd">
    <img src="https://img.shields.io/pypi/pyversions/torchfsdd?style=flat-square" alt="PyPI - Python Version"/>
  </a>
  <a href="https://raw.githubusercontent.com/eonu/torchfsdd/master/LICENSE">
    <img src="https://img.shields.io/pypi/l/torchfsdd?style=flat-square" alt="PyPI - License"/>
  </a>
  <a href="https://torch-fsdd.readthedocs.io/en/latest/">
    <img src="https://readthedocs.org/projects/torch-fsdd/badge/?version=latest&style=flat-square" alt="Read The Docs - Documentation"/>
  </a>
</p>

## About

The [Free Spoken Digit Dataset](https://github.com/Jakobovski/free-spoken-digit-dataset) is an open data set consisting of audio recordings of various individuals speaking the digits from 0-9, with 50 recordings of each digit per individual.

The data set can be thought of as an audio version of the popular [MNIST data set](https://en.wikipedia.org/wiki/MNIST_database) which consists of hand-written digits. However, the fact that the data consists of recordings of different durations makes it more challenging to deal with than the fixed-size images of MNIST.

TorchFSDD aims to provide an interface to FSDD for PyTorch model development, by providing a [`torch.utils.data.Dataset`](https://pytorch.org/docs/stable/data.html#torch.utils.data.Dataset) wrapper that is ready to be used with a [`torch.utils.data.DataLoader`](https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader).

## Build status

| `master` | `dev` |
| -------- | ------|
| [![CircleCI Build (Master)](https://img.shields.io/circleci/build/github/eonu/torch-fsdd/master?logo=circleci&style=flat-square)](https://app.circleci.com/pipelines/github/eonu/torch-fsdd?branch=master) | [![CircleCI Build (Development)](https://img.shields.io/circleci/build/github/eonu/torch-fsdd/dev?logo=circleci&style=flat-square)](https://app.circleci.com/pipelines/github/eonu/torch-fsdd?branch=master) |

## Examples

```python
from torchfsdd import TorchFSDDGenerator, TrimSilence
from torchaudio.transforms import MFCC
from torchvision.transforms import Compose

# Create a transformation pipeline to apply to the recordings
transforms = Compose([
    TrimSilence(threshold=1e-6),
    MFCC(sample_rate=8e3, n_mfcc=13)
])

# Fetch the latest version of FSDD and initialize a generator with those files
fsdd = TorchFSDDGenerator(version='master', transforms=transforms)

# Create a Torch dataset for the entire dataset from the generator
full_set = fsdd.full()
# Create two Torch datasets for a train-test split from the generator
train_set, test_set = fsdd.train_test_split(test_size=0.1)
# Create three Torch datasets for a train-validation-test split from the generator
train_set, val_set, test_set = fsdd.train_val_test_split(test_size=0.15, val_size=0.15)
```

A more complete example can be found [here](./notebooks), showing how TorchFSDD can be used to train a neural network.

## Installation

You can install TorchFSDD using `pip`.

```console
pip install torchfsdd
```

**Note**: TorchFSDD assumes you have the following packages already installed (along with Python v3.6+).

- [`torch`](https://github.com/pytorch/pytorch) (>= 1.8.0)
- [`torchaudio`](https://github.com/pytorch/audio) (>= 0.8.0)

Since there are many different possible configurations when installing PyTorch (e.g. CPU or GPU, CUDA version), we leave this up to the user instead of specifying particular versions to install alongside TorchFSDD.

Make sure you have `torch` and `torchaudio` versions that are [compatible](https://github.com/pytorch/audio#dependencies)!

> If you _really_ wish to install `torch` and `torchaudio` together with TorchFSDD automatically, the following will install CPU-only versions of both dependencies.
>
> ```console
> pip install torchfsdd[torch]
> ```

### Development

Please see the [contribution guidelines](/CONTRIBUTING.md) to see installation instructions for contributing to this repository.

## Documentation

Documentation for the package is available on [Read The Docs](https://torch-fsdd.readthedocs.io/en/latest).

## Contributors

All contributions to this repository are greatly appreciated. Contribution guidelines can be found [here](/CONTRIBUTING.md).

<table>
	<thead>
		<tr>
			<th align="center">
        <a href="https://github.com/eonu">
          <img src="https://avatars0.githubusercontent.com/u/24795571?s=460&v=4" alt="eonu" width="60px">
          <br/><sub><b>eonu</b></sub>
        </a>
			</th>
      <th align="center">
        <a href="https://github.com/black-puppydog">
          <img src="https://avatars.githubusercontent.com/u/189241?v=4" alt="black-puppydog" width="60px">
          <br/><sub><b>black-puppydog</b></sub>
        </a>
			</th>
			<!-- Add more <th></th> blocks for more contributors -->
		</tr>
	</thead>
</table>

---

<p align="center">
  <b>TorchFSDD</b> &copy; 2021-2023, Edwin Onuonga - Released under the <a href="https://opensource.org/licenses/MIT">MIT</a> License.<br/>
  <em>Authored and maintained by Edwin Onuonga.</em>
</p>



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eonu/torch-fsdd",
    "name": "torchfsdd",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Edwin Onuonga",
    "author_email": "ed@eonu.net",
    "download_url": "https://files.pythonhosted.org/packages/65/4d/309915fa4e57c5d125c2821f4f94a0ff2a862a746e88631d7dcbd6e3eeb8/torchfsdd-1.0.0.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">\n  TorchFSDD\n</h1>\n\n<p align=\"center\">\n  <em>A utility for wrapping the Free Spoken Digit Dataset into PyTorch-ready data set splits.</em>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://pypi.org/project/torchfsdd\">\n    <img src=\"https://img.shields.io/pypi/v/torchfsdd?style=flat-square\" alt=\"PyPI\"/>\n  </a>\n  <a href=\"https://pypi.org/project/torchfsdd\">\n    <img src=\"https://img.shields.io/pypi/pyversions/torchfsdd?style=flat-square\" alt=\"PyPI - Python Version\"/>\n  </a>\n  <a href=\"https://raw.githubusercontent.com/eonu/torchfsdd/master/LICENSE\">\n    <img src=\"https://img.shields.io/pypi/l/torchfsdd?style=flat-square\" alt=\"PyPI - License\"/>\n  </a>\n  <a href=\"https://torch-fsdd.readthedocs.io/en/latest/\">\n    <img src=\"https://readthedocs.org/projects/torch-fsdd/badge/?version=latest&style=flat-square\" alt=\"Read The Docs - Documentation\"/>\n  </a>\n</p>\n\n## About\n\nThe [Free Spoken Digit Dataset](https://github.com/Jakobovski/free-spoken-digit-dataset) is an open data set consisting of audio recordings of various individuals speaking the digits from 0-9, with 50 recordings of each digit per individual.\n\nThe data set can be thought of as an audio version of the popular [MNIST data set](https://en.wikipedia.org/wiki/MNIST_database) which consists of hand-written digits. However, the fact that the data consists of recordings of different durations makes it more challenging to deal with than the fixed-size images of MNIST.\n\nTorchFSDD aims to provide an interface to FSDD for PyTorch model development, by providing a [`torch.utils.data.Dataset`](https://pytorch.org/docs/stable/data.html#torch.utils.data.Dataset) wrapper that is ready to be used with a [`torch.utils.data.DataLoader`](https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader).\n\n## Build status\n\n| `master` | `dev` |\n| -------- | ------|\n| [![CircleCI Build (Master)](https://img.shields.io/circleci/build/github/eonu/torch-fsdd/master?logo=circleci&style=flat-square)](https://app.circleci.com/pipelines/github/eonu/torch-fsdd?branch=master) | [![CircleCI Build (Development)](https://img.shields.io/circleci/build/github/eonu/torch-fsdd/dev?logo=circleci&style=flat-square)](https://app.circleci.com/pipelines/github/eonu/torch-fsdd?branch=master) |\n\n## Examples\n\n```python\nfrom torchfsdd import TorchFSDDGenerator, TrimSilence\nfrom torchaudio.transforms import MFCC\nfrom torchvision.transforms import Compose\n\n# Create a transformation pipeline to apply to the recordings\ntransforms = Compose([\n    TrimSilence(threshold=1e-6),\n    MFCC(sample_rate=8e3, n_mfcc=13)\n])\n\n# Fetch the latest version of FSDD and initialize a generator with those files\nfsdd = TorchFSDDGenerator(version='master', transforms=transforms)\n\n# Create a Torch dataset for the entire dataset from the generator\nfull_set = fsdd.full()\n# Create two Torch datasets for a train-test split from the generator\ntrain_set, test_set = fsdd.train_test_split(test_size=0.1)\n# Create three Torch datasets for a train-validation-test split from the generator\ntrain_set, val_set, test_set = fsdd.train_val_test_split(test_size=0.15, val_size=0.15)\n```\n\nA more complete example can be found [here](./notebooks), showing how TorchFSDD can be used to train a neural network.\n\n## Installation\n\nYou can install TorchFSDD using `pip`.\n\n```console\npip install torchfsdd\n```\n\n**Note**: TorchFSDD assumes you have the following packages already installed (along with Python v3.6+).\n\n- [`torch`](https://github.com/pytorch/pytorch) (>= 1.8.0)\n- [`torchaudio`](https://github.com/pytorch/audio) (>= 0.8.0)\n\nSince there are many different possible configurations when installing PyTorch (e.g. CPU or GPU, CUDA version), we leave this up to the user instead of specifying particular versions to install alongside TorchFSDD.\n\nMake sure you have `torch` and `torchaudio` versions that are [compatible](https://github.com/pytorch/audio#dependencies)!\n\n> If you _really_ wish to install `torch` and `torchaudio` together with TorchFSDD automatically, the following will install CPU-only versions of both dependencies.\n>\n> ```console\n> pip install torchfsdd[torch]\n> ```\n\n### Development\n\nPlease see the [contribution guidelines](/CONTRIBUTING.md) to see installation instructions for contributing to this repository.\n\n## Documentation\n\nDocumentation for the package is available on [Read The Docs](https://torch-fsdd.readthedocs.io/en/latest).\n\n## Contributors\n\nAll contributions to this repository are greatly appreciated. Contribution guidelines can be found [here](/CONTRIBUTING.md).\n\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th align=\"center\">\n        <a href=\"https://github.com/eonu\">\n          <img src=\"https://avatars0.githubusercontent.com/u/24795571?s=460&v=4\" alt=\"eonu\" width=\"60px\">\n          <br/><sub><b>eonu</b></sub>\n        </a>\n\t\t\t</th>\n      <th align=\"center\">\n        <a href=\"https://github.com/black-puppydog\">\n          <img src=\"https://avatars.githubusercontent.com/u/189241?v=4\" alt=\"black-puppydog\" width=\"60px\">\n          <br/><sub><b>black-puppydog</b></sub>\n        </a>\n\t\t\t</th>\n\t\t\t<!-- Add more <th></th> blocks for more contributors -->\n\t\t</tr>\n\t</thead>\n</table>\n\n---\n\n<p align=\"center\">\n  <b>TorchFSDD</b> &copy; 2021-2023, Edwin Onuonga - Released under the <a href=\"https://opensource.org/licenses/MIT\">MIT</a> License.<br/>\n  <em>Authored and maintained by Edwin Onuonga.</em>\n</p>\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A utility for wrapping the Free Spoken Digit Dataset into PyTorch-ready data set splits.",
    "version": "1.0.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "59dd3b917f863a25b9cb7d8c23527e75",
                "sha256": "201296823e1282028500244067ab69ccaa77e48288884f7c12627ae8441c5865"
            },
            "downloads": -1,
            "filename": "torchfsdd-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "59dd3b917f863a25b9cb7d8c23527e75",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11971,
            "upload_time": "2022-12-27T20:40:51",
            "upload_time_iso_8601": "2022-12-27T20:40:51.538668Z",
            "url": "https://files.pythonhosted.org/packages/65/4d/309915fa4e57c5d125c2821f4f94a0ff2a862a746e88631d7dcbd6e3eeb8/torchfsdd-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-27 20:40:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "eonu",
    "github_project": "torch-fsdd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "lcname": "torchfsdd"
}
        
Elapsed time: 0.03101s