bepierre / SpeechVGG

Feature extractor for DL speech processing.
GNU General Public License v3.0
65 stars 13 forks source link

Error in example extract_and_classify.ipynb #6

Closed Andrea-de-Varda closed 2 years ago

Andrea-de-Varda commented 2 years ago

First of all, thanks for sharing this great repository!

I think there is an error in examples/speech_music_noise/extract_and_classify.ipynb in the function remove_short_clips. I think that you meant to write clips=np.array(clips)[good_idxs]

def remove_short_clips(clips, length=16200):
    good_idxs = []
    for i, clip in enumerate(clips):
        audio = sf.read(clip)
        audio = audio[0]
        if len(audio)>=length:
            good_idxs.append(i)
    clips=np.array(noise_clips)[good_idxs]
    return clips

Thanks!

bepierre commented 2 years ago

thanks for spotting that mistake !