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

Value error: negative dimensions are not allowed when using spafe library #13

Closed
barrydjenaba opened this issue Apr 6, 2020 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@barrydjenaba
Copy link

I am working in audio files and I use this code to extract lfcc features:

audio_path = '03-01-02-02-01-01-01_norm.wav'

fs, sig = scipy.io.wavfile.read(audio_path)

lfcc = lfcc(sig, 13)

but I have this value error:

negative dimensions are not allowed

I think that it is because my sig array has negative values, can you give me a way to fix it?
Thank you for yor help

@SuperKogito
Copy link
Owner

can you provide the full trace-back of the error and maybe the audio if possible?

@barrydjenaba
Copy link
Author

barrydjenaba commented Apr 7, 2020

i send you the audio by email beacuse i can't insert it here. I just used this code :

import scipy.io.wavfile
import spafe.utils.vis as vis
from spafe.features.lfcc import lfcc
from spafe.features.lpc import lpc
audio_path = '03-01-05-01-01-01-01_norm_outNoise.wav'
fs, sig = scipy.io.wavfile.read(audio_path)
lpc  = lfcc(sig, 13)

@SuperKogito SuperKogito self-assigned this Apr 19, 2020
@SuperKogito SuperKogito added bug Something isn't working question Further information is requested and removed bug Something isn't working labels Apr 19, 2020
@SuperKogito
Copy link
Owner

You did not specify a sampling rate value fs, use: lpc = lfcc(sig, fs, 13)

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

No branches or pull requests

2 participants