tools/utilities/pythonlibs/audio/training/make_dataset.py
def make_dataset(list_file, featurizer_path, sample_rate, window_size, shift):

    """
    Create a dataset given the input list file, a featurizer, the desired .wav sample rate,
    classifier window_size and window shift amount.  The dataset is saved to the same file name
    with .npz extension.
    """
    transform = featurizer.AudioTransform(featurizer_path, 0)
    input_size = transform.input_size
    output_shape = transform.model.output_shape
    output_size = output_shape.Size()
    feature_size = output_shape.Size()
    feature_shape = (output_shape.rows, output_shape.columns, output_shape.channels)

    entry_map = parse_list_file(list_file)

    dataset = _get_dataset(entry_map, transform, sample_rate, window_size, shift)
    if len(dataset.features) == 0:
        print("No features found in list file")

    dataset_name = os.path.basename(list_file)
    dataset_path = os.path.splitext(dataset_name)[0] + ".npz"
    print("Saving: {}".format(dataset_path))
    dataset.save(dataset_path)

    Create a dataset given the input list file, a featurizer, the desired .wav sample rate,
    classifier window_size and window shift amount.  The dataset is saved to the same file name
    with .npz extension.
    
Create a dataset given the input list file, a featurizer, the desired .wav sample rate,
classifier window_size and window shift amount.  The dataset is saved to the same file name
with .npz extension.
Create a dataset given the input list file a featurizer the desired . wav sample rate classifier window_size and window shift amount . The dataset is saved to the same file name with . npz extension .
def make_dataset(list_file, featurizer_path, sample_rate, window_size, shift):
    transform = featurizer.AudioTransform(featurizer_path, 0)
    input_size = transform.input_size
    output_shape = transform.model.output_shape
    output_size = output_shape.Size()
    feature_size = output_shape.Size()
    feature_shape = (output_shape.rows, output_shape.columns, output_shape.channels)
    entry_map = parse_list_file(list_file)
    dataset = _get_dataset(entry_map, transform, sample_rate, window_size, shift)
    if len(dataset.features) == 0:
        print("No features found in list file")
    dataset_name = os.path.basename(list_file)
    dataset_path = os.path.splitext(dataset_name)[0] + ".npz"
    print("Saving: {}".format(dataset_path))
    dataset.save(dataset_path)
def make_dataset ( list_file , featurizer_path , sample_rate , window_size , shift ) : transform = featurizer . AudioTransform ( featurizer_path , 0 ) input_size = transform . input_size output_shape = transform . model . output_shape output_size = output_shape . Size ( ) feature_size = output_shape . Size ( ) feature_shape = ( output_shape . rows , output_shape . columns , output_shape . channels ) entry_map = parse_list_file ( list_file ) dataset = _get_dataset ( entry_map , transform , sample_rate , window_size , shift ) if len ( dataset . features ) == 0 : print ( "No features found in list file" ) dataset_name = os . path . basename ( list_file ) dataset_path = os . path . splitext ( dataset_name ) [ 0 ] + ".npz" print ( "Saving: {}" . format ( dataset_path ) ) dataset . save ( dataset_path )
Create a dataset given the input list file, a featurizer, the desired .wav sample rate,
classifier window_size and window shift amount.
Create a dataset given the input list file a featurizer the desired . wav sample rate classifier window_size and window shift amount .
"""
    Create a dataset given the input list file, a featurizer, the desired .wav sample rate,
    classifier window_size and window shift amount.  The dataset is saved to the same file name
    with .npz extension.
    """
list_file
featurizer_path
sample_rate
window_size
shift