Ant-Brain / EfficientWord-Net

OneShot Learning-based hotword detection.
https://ant-brain.github.io/EfficientWord-Net/
Apache License 2.0
231 stars 37 forks source link

AssertionError: Minimum of 4 sample datapoints is required #43

Open ZXTube opened 1 year ago

ZXTube commented 1 year ago

I made my ref using generate_reference but for some reason the _ref file it made always had an empty list, so I opened the generate_reference.py file to find out that only .mp3 and .wav files are searched for, while I had .m4a files, so please make some exception to say that.

Sorry I don't know how to make pull requests.

line 56, generate_reference.py:

audio_files = [
        *glob.glob(input_dir+"/*.mp3"),
        *glob.glob(input_dir+"/*.wav")
    ]

if len(audio_files) < 4:
    raise(Exception("Not enough audio files provided, keep in mind that only .mp3 and .wav files are supported"))
else:
    print(len(audio_files), "audio files were found, keep in mind that only .mp3 and .wav files are supported")

Thank you.

TheSeriousProgrammer commented 1 year ago

sure, make sense will include the same in the next rollouts. Thanks for the contribution!!