Skip to content

Improve preprocess.audio.load_wav() #8

@nnbuainain

Description

@nnbuainain

Is your feature request related to a problem? Please describe.
the load_wav() function is inefficient and can be improved for speed and performance.

Describe the solution you'd like

  • Add condition to only resample when Original sr is different from target sr
  • Avoid conversion from tensors to numpy arrays multiple times
  • Check if this line is necessary: if len(tf.shape(y)) > 1:

Describe alternatives you've considered
Use time it to compare the performance of simply loading and resampling with librosa

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions