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

MFCC uncaught error: frameSize lower bound #83

Open
2 of 9 tasks
jmarcosfer opened this issue Dec 26, 2021 · 0 comments
Open
2 of 9 tasks

MFCC uncaught error: frameSize lower bound #83

jmarcosfer opened this issue Dec 26, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@jmarcosfer
Copy link
Collaborator

What is the issue about?

  • Bug
  • Feature request
  • Usage question
  • Documentation
  • Contributing / Development

What part(s) of Essentia.js is involved?

  • essentia.js-core (vanilla algorithms)
  • essentia.js-model (machine learning algorithms)
  • essentia.js-plot (plotting utility module)
  • essentia.js-extractor (typical algorithm combinations utility)

Description

When computing MFCCs, any frame size equal to or lower than 426 results in an uncaught WASM error.

Steps to reproduce / Code snippets / Screenshots

	const frames = self.essentia.FrameGenerator(msg.data.audio, frameSize, frameSize*0.5);
	for (let i = 0; i < frames.size(); i++) {
		const audioVector = frames.get(i);
		const windowedFrame = self.essentia.Windowing(audioVector, true, frameSize).frame;
		const spectrum = self.essentia.Spectrum(windowedFrame, frameSize).spectrum;
		const mfccs = self.essentia.MFCC(spectrum, 2, 11000, spectrum.size()).mfcc;
		corpusArray.push({
			id: corpusSizeCount,
			frame: self.essentia.vectorToArray(audioVector),
			analysis: self.essentia.vectorToArray(mfccs)
		});
		corpusSizeCount++;
	}

For the frame size described above, this produces the following error on the dev console:
Captura de pantalla 2021-12-26 a las 11 35 53

System info

Hardware: MacBook Pro 15 inch 2018, 16GB RAM, 2,2 GHz Intel Core i7 6 cores
OS: macOS Catalina 10.15.7
Platform: Chrome 96.0.4664.110
Library version: Essentia.js 0.1.3

@jmarcosfer jmarcosfer added the bug Something isn't working label Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant