v2.5.0
Datasets ⭐
EXAMPLE CODE
NSynth Dataset
Load the NSynth dataset with one line of code. Stream the NSynth dataset of music notes while training models in PyTorch & TensorFlow. Visualize NSynth.
Visualization of the Nsynth dataset on the Activeloop Platform

NSynth dataset

What is NSynth Dataset?

NSynth is a dataset made of one-shot instrumental notes. The dataset contains 305,979 musical notes that have a unique pitch, timbre, and envelope. The sounds in the dataset were collected from 1006 instruments from commercial sample libraries. The sounds were annotated based on their sonic qualities, source (acoustic, electronic, or synthetic), and instrument family (bass, brass, flute, guitar, keyboard, mallet, organ, reed, string, synth lead, and vocal).

Download NSynth Dataset in Python

Instead of downloading the NSynth dataset in Python, you can effortlessly load it in Python via our open-source package Hub with just one line of code.

Load NSynth Dataset Training Subset in Python

1
import hub
2
ds = hub.load("hub://activeloop/nsynth-train")
Copied!

Load NSynth Dataset Testing Subset in Python

1
import hub
2
ds = hub.load("hub://activeloop/nsynth-test")
Copied!

Load NSynth Dataset Validation Subset in Python

1
import hub
2
ds = hub.load("hub://activeloop/nsynth-val")
Copied!

NSynth Dataset Structure

NSynth Data Fields

  • audios: tensor to represent audio in wav format.
  • sample_rate: tensor representing the sample rate of audio.
  • pitch: tensor representing the pitch of audio.
  • instrument_source: tensor representing the source of audio instrument.
  • instrument_family: tensor to represent the family of audio instrument.
  • note: tensor text representing the audio.
  • qualities: tensor to represent the quality of audio.
  • velocity: tensor to represent the velocity of audio wave.
  • instrument: tensor to represent the instrument with which the audio is created.

NSynth Data Splits

How to use NSynth Dataset with PyTorch and TensorFlow in Python

Train a model on NSynth dataset with PyTorch in Python

Let's use Hub's built-in PyTorch one-line dataloader to connect the data to the compute:
1
dataloader = ds.pytorch(num_workers=0, batch_size=4, shuffle=False)
Copied!

Train a model on NSynth dataset with TensorFlow in Python

1
dataloader = ds.tensorflow()
Copied!

Additional Information about NSynth Dataset

NSynth Dataset Description

  • Repository: N/A
  • Paper: Jesse Engel, Cinjon Resnick, Adam Roberts, Sander Dieleman, Douglas Eck, Karen Simonyan, and Mohammad Norouzi. "Neural Audio Synthesis of Musical Notes with WaveNet Autoencoders." 2017.
  • Point of Contact: N/A

NSynth Dataset Curators

Jesse Engel, Cinjon Resnick, Adam Roberts, Sander Dieleman, Douglas Eck, Karen Simonyan, and Mohammad Norouzi

NSynth Dataset Licensing Information

Hub users may have access to a variety of publicly available datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have a license to use the datasets. It is your responsibility to determine whether you have permission to use the datasets under their license.
If you're a dataset owner and do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thank you for your contribution to the ML community!

NSynth Dataset Citation Information

1
@misc{nsynth2017,
2
Author = {Jesse Engel and Cinjon Resnick and Adam Roberts and
3
Sander Dieleman and Douglas Eck and Karen Simonyan and
4
Mohammad Norouzi},
5
Title = {Neural Audio Synthesis of Musical Notes with WaveNet Autoencoders},
6
Year = {2017},
7
Eprint = {arXiv:1704.01279},
8
}
Copied!

NSynth Dataset FAQs

What is the NSynth dataset for Python?

NSynth is an audio dataset with 305,979 musical notes. The dataset is often used to classify wave files (.wav) based on their instrument family. NSynth is also a popular benchmark and entry point into audio machine learning. The creators of the dataset view NSynth as a building block for future datasets.

How can I use NSynth dataset in PyTorch or TensorFlow?

You can stream the NSynth dataset while training a model in PyTorch or TensorFlow with one line of code using the open-source package Activeloop Hub in Python. See detailed instructions on how to train a model on NSynth dataset with PyTorch in Python or train a model on NSynth dataset with TensorFlow in Python.