Skip to content

Handling variable length audio for extract_data.py #4

@signalarun

Description

@signalarun

My audio is of varied length and I am obtaining the following error. Should the duration be calculated dynamically ?

ValueError                                Traceback (most recent call last)
<ipython-input-4-b10fa00927a8> in <module>()
----> 1 save_mfcc(DATASET_PATH, JSON_PATH, num_segments=2)

5 frames
<__array_function__ internals> in pad(*args, **kwargs)

/usr/local/lib/python3.6/dist-packages/numpy/lib/arraypad.py in pad(array, pad_width, mode, **kwargs)
    819                 raise ValueError(
    820                     "can't extend empty axis {} using modes other than "
--> 821                     "'constant' or 'empty'".format(axis)
    822                 )
    823         # passed, don't need to do anything more as _pad_simple already

ValueError: can't extend empty axis 0 using modes other than 'constant' or 'empty'
 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions