nam.data

Functions and classes for working with audio data with NAM

Functions

apply_joint_dataset_hooks(dataset_train, ...)

get_joint_dataset_hooks(hook_configs)

init_dataset(config, split)

normalize_joint_dataset_output(*args, **kwargs)

np_to_wav(x, filename[, rate, sampwidth, scale])

register_dataset_initializer(name, constructor)

If you have other data set types, you can register their initializer by name using this.

tensor_to_wav(x, *args, **kwargs)

wav_to_np(filename[, rate, require_match, ...])

param filename:

Where to load from

wav_to_tensor(*args[, info])

Classes

AbstractDataset()

ConcatDataset(datasets[, flatten])

Dataset(x, y, nx, ny[, start, stop, ...])

Take a pair of matched audio files and serve input + output pairs.

JointDatasetHook()

NormalizeJointDatasetOutput(level_rms_dbfs)

Split(value)

An enumeration.

WavInfo(sampwidth, rate)

param sampwidth:

Sample width, in bytes. May be None if not known.

Exceptions

AudioShapeMismatchError(shape_expected, ...)

Exception where the shape (number of samples, number of channels) of two audio files don't match but were supposed to.

ConcatDatasetValidationError

Error raised when a ConcatDataset fails validation

DataError

Parent class for all special exceptions raised by NAM data sets

DatasetModelHandshakeError

Raised if a handshake fails from dataset to model

JointDatasetValidationError

StartError

StartStopError

Exceptions related to invalid start and stop arguments

StopError

XYError

Exceptions related to invalid x and y provided for data sets