2

I ' am working on audio file and need to use spafe library for lfcc, lpc... and i install the library as mentionned in the site : https://spafe.readthedocs.io/en/latest/

But when i try to extract some features , like lfcc, mfcc, lpc, i have import error par example when i use this code :

import scipy.io.wavfile

import spafe.utils.vis as vis

from spafe.features.mfcc import lfcc

i have this error :

ImportError: cannot import name 'lfcc'

I don't undestand because i can import spafe, i have all dependancies the libraries required with the correct versions ( numpy, scipy...).

desertnaut
  • 57,590
  • 26
  • 140
  • 166
BARRY
  • 45
  • 3

1 Answers1

1

There seems to be a typo in the docs example (which I guess tou are trying to follow); it should be

from spafe.features.lfcc import lfcc

i.e. lfcc, not mfcc (which mfcc indeed does not have a module lfcc, hence the error).

desertnaut
  • 57,590
  • 26
  • 140
  • 166
  • thank you. i don't see it. but when i aply this code : – BARRY Apr 03 '20 at 14:05
  • audio_path = '03-01-02-02-01-01-01_norm.wav' fs, sig = scipy.io.wavfile.read(audio_path) lfcc = lfcc(sig, 13) i have value error : negative dimensions are not allowed because my sig array have negative values. Do you have a way to fix it? Thank you – BARRY Apr 03 '20 at 14:12