-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
NodeJS binding against node-v69? #2032
Comments
There is no 69 here: https://nodejs.org/en/download/releases/ |
Is it possible that list is wrong or out of date? How else could NPM could be giving me the error "This version of Node.js requires [1] NODE_MODULE_VERSION 69" if v69 does not exist? |
I can't do divination ... But you mention electron. Maybe they have more recent |
Those are fine, the |
@dsteinman You can try to just rebuild, there's the Followed by that other You should download latest stable native_client.tar.xz and create I can't promise that |
@dsteinman Here: https://github.com/mapbox/node-pre-gyp/blob/master/lib/util/abi_crosswalk.json there's no |
Okay it didn't occur to me that Electron could actually be ahead of NodeJS in terms of these module numbers. I did a google search and I did find some hits on this same issue. If there's no way to update Deepspeech to 69 right now I'll just downgrade my version of Electron and find a version which ships with v67. |
Bingo, they bumped to v69 in Electron 4.0.4: https://electronjs.org/releases/stable?page=2#release-notes-for-v404 |
Maybe worth you give a try to what I suggested, otherwise we have to wait for next NodeJS release. |
From the linked issue there it seems like Electron is moving to their own ABI version, separate from Node.JS, and next Node releases won't fix it? Or am I reading it incorrectly? |
@reuben perhaps, it looks like some other way to do this linking may be required for Electron support. Downgrading Electron has also not been successful. Both Electron v4.0.3 and v4.0.0 want to link against node-v69 for some reason. And I also tried Electron 3.1.8, which wants node-v64, but then that fails for a different reason:
I did previously have this working with Electron 2.0.2 and node-v57 but these are too old and have vulnerabilities. I haven't tried to compile DeepSpeech manually, but at this point I don't think that's going to matter unless I know how to link the deepspeech.node in electron. |
On the bug you linked it seemed they followed different ABI, that might explain it
No need to rebuild |
@dsteinman https://electronjs.org/releases/stable#release-notes-for-v410 Can you try and find more informations about that: |
@dsteinman mapbox/node-pre-gyp#437 (comment) According to that comment, then we could pass |
@lissyx I appreciate the help, yes I think indeed adding the right node-gyp variables in the right place within the DeepSpeech build tools could do the trick, I found this as well: https://electronjs.org/docs/tutorial/using-native-node-modules
|
@dsteinman So I don't have an electron runtime but:
and then:
|
At runtime, though:
|
Ok @dsteinman I got it, one also need to give proper download URL so in the previous patch you need to add a Then I don't have any error but I'm facing a big issue: I don't know how to test that. We can likely quickly add build for many versions of ElecronJS, but so far you should not expect "support". If you can send PR for a test, it would be helpful. |
@dsteinman So that https://queue.taskcluster.net/v1/task/L5TQAdXJRaa_evk39cV4jg/runs/0/artifacts/public/deepspeech-0.5.0-alpha.5.tgz should bundle from ElectronJS v1.6 to v4.1 |
Seems to work here:
|
@lissyx Terrific! Unfortunately I don't have a quick way to test this out yet because I don't have DeepSpeech and TensorFlow compiling locally but I'll probably work on it today. |
Well in a few minutes you should be able to see a working package at https://tools.taskcluster.net/groups/OLINF0wXR8uzo0aF8cirPQ/tasks/bVVTsw2oTsuRgKiBdnbWaA/runs/0/artifacts I still have a few changes to push to add more test coverage, but assuming this will go smoothly on v3.8, v4.0 for linux/macOS/windows, we should be able to merge today |
Great work @lissyx I downloaded that package and yeah it looks like it's working so far. I have some more code to load in but this is going to be really awesome. If you're curious what I'm doing with it, I'm using an electron app so I can connect DeepSpeech to web pages (client-side) through a web browser extension. Not sure if anyone has thought to do this but so far it's working reasonably well. |
Will a new set of 0.5-alpha model files be required? The files in deepspeech-0.4.1-models.tar.gz is giving me this error:
|
We don't release model files with alpha releases, but yes, new models will be required. You may be able to re-export the 0.4.1 models with the latest code to get a working model, but we haven't tried it yet and don't know how hard it would be. |
No problem, I'm not quite confident enough that I'll be able to figure it out on my own so I don't mind waiting. But is there any ETA for this new 0.5 version? |
I think biggest blocker is on my end with the exposure of metadata struct to bindings, JS and Python have a working solution but not yet Java. |
Not yet |
Okay I'm looking forward to it, and will try it out as soon as it's released. Thanks for all the help. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
After upgrading my version of NodeJS to v10.15.2 I can no longer compile DeepSpeech because there's no v69 version of the binding. I would rather try to update DeepSpeech for v69 than to try downgrading again. I don't exactly know how to do this, but this is where I'm at:
FYI there's an electron-v4.1 directory there because I'm using ElectronJS which requires a softlink from:
deepspeech/lib/binding/v0.4.1/darwin-x64/electron-v4.1
To:
deepspeech/lib/binding/v0.4.1/darwin-x64/node-v69
But there is no
node-v69
there are only these versions:So I need to know how to add a node-v69 entry I also tried upgrade to NodeJS v11.13.0 with the same problem, it also wants node-v69.
I looked around in the DeepSpeech repo, and it looks like there's just one file that might need to be updated:
taskcluster/.shared.yml
So I'm guessing 2 additional lines should be added:
prep_12: 'nvm install 10.15.2 && nvm use 10.15.0'
prep_13: 'nvm install 11.13.0 && nvm use 11.13.0'
Or maybe re-order the "prep" lines to match?
The text was updated successfully, but these errors were encountered: