import error when using spafe library for feature extraction

女生的网名这么多〃 提交于 2020-04-16 04:02:44

问题


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...).


回答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).



来源:https://stackoverflow.com/questions/61012650/import-error-when-using-spafe-library-for-feature-extraction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!