Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global name 'librosa' is not defined #47

Open
Reagan1947 opened this issue Sep 4, 2019 · 5 comments
Open

Global name 'librosa' is not defined #47

Reagan1947 opened this issue Sep 4, 2019 · 5 comments

Comments

@Reagan1947
Copy link

Sednn/mixture2clean_dnn/preparedata.py

def read_audio(path, target_fs=None):
    (audio, fs) = soundfile.read(path)
    if audio.ndim > 1:
        audio = np.mean(audio, axis=1)
    if target_fs is not None and fs != target_fs:
        audio = librosa.resample(audio, orig_sr=fs, target_sr=target_fs)
        fs = target_fs
    return audio, fs
  • librosa is not define, Should import pack librosa.
  • Moreover librosa will also cause TypeError: expected string or buffer
    pip install 'joblib==0.11' --force-reinstall will solve it.
@yongxuUSTC
Copy link
Owner

yongxuUSTC commented Sep 4, 2019 via email

@Reagan1947
Copy link
Author

Is import of "librosa" package a must? at preparedata.py

@qiuqiangkong
Copy link
Collaborator

qiuqiangkong commented Sep 7, 2019 via email

@Reagan1947
Copy link
Author

@yongxuUSTC
Copy link
Owner

yongxuUSTC commented Sep 10, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants