Closed lane203m closed 2 years ago
Did you ever solve this? I am just messing around with the library in electron at the moment and I cant run it in main
process as that doesn't have an implementation of AudioContext
and cant run it in renderer
process as the wasm cant be imported and all workarounds with workers seem to throw some issue or other, and cant include it via script tags as they all get stripped via webpack.
I did
See https://github.com/lane203m/SoundByte/blob/master/Soundbyte-App/src/main.ts
onReady must set webPreferences: {nodeIntegration: true, enableRemoteModule: true, nodeIntegrationInWorker: true}
Here is an example of my web workers https://github.com/lane203m/SoundByte/tree/master/Soundbyte-App/src/Initialization/buildJSON https://github.com/lane203m/SoundByte/blob/master/Soundbyte-App/src/Initialization/buildJSON/workers/primes/essentiaWorker.js
Here is the project https://github.com/lane203m/SoundByte
Thanks for information, I still cant get it working as webpack complains it cant resolve path
which makes sense as the umd module seems to require it, anyway its another source to draw from to try and get it working, thanks again.
Sorry, we still haven't tried the library with Electron. Thanks a lot @lane203m for sharing your solution!
due to the size of the wasm file, I cannot require the essentia.js module on my electron application. How may I work around this? I do not understand how to use web workers for this purpose.