Skip to content

AudioSegment.from_file is not restricted to WAV files #14

Description

@NicolasMICAUX

Feature Description

In preprocess.py, you use AudioSegment.from_file to load the audio files. According to definition of this function, it seems it accepts a bunch of file formats.
but at the previous line, you restrict the user to wav files for ... in label_dir.glob("*.wav")
Is there a reason to that? Mp3/ogg/etc. files would be useful, as they take less place on the disk.

Use Case

Basic preprocess then train, as in README.

Solution

replace .glob('*wav') by a list of formats pydub accepts. I didn't find a list yet, but the implementation of from_file gives us some hints of the formats accepted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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