Spoken-language-identification
Spoken-language-identification copied to clipboard
code error in create_spectrograms.py
your code at line 44 in create_spectrograms.py is probably wrong, which is:
scale = np.array(map(lambda x: x * alpha if x <= f0 else (fmax-alpha*f0)/(fmax-f0)*(x-f0)+alpha*f0, scale))
cause the map function returns an iterator, not an array. I change it to this:
scale = np.where(scale <= f0, scale * alpha, (fmax-alpha*f0)/(fmax-f0)*(scale-f0)+alpha*f0)
and it works.