This is not really an unsolvable problem, but it did take me a while to figure the thing out, so I think it'd be helpful to write a issue of solution here for others to search for later.
So if you're using NPM and your project is in ES module flavor, the correct way to initialize Essentia should be:
import EssentiaPkg from 'essentia.js';
const { Essentia, EssentiaWASM: { EssentiaWASM } } = EssentiaPkg;
const essentia = new Essentia(EssentiaWASM);
Don't know why EssentiaWASM is wrapped in one more layer, but it is what it is.
My installed version is essentia.js@0.1.3.
What is the issue about?
What part(s) of Essentia.js is involved?
Description
This is not really an unsolvable problem, but it did take me a while to figure the thing out, so I think it'd be helpful to write a issue of solution here for others to search for later.
So if you're using NPM and your project is in ES module flavor, the correct way to initialize Essentia should be:
Don't know why
EssentiaWASM
is wrapped in one more layer, but it is what it is. My installed version isessentia.js@0.1.3
.