I don’t know how you can tell macOS to change its platform at runtime, our loading code will use arch-specific paths, so since the system sees this is ARM64, it loads it: https://github.com/mozilla/DeepSpeech/blob/fcbd92d0d75beee36473aa44669fa330ca522cdc/native_client/javascript/index.ts#L5 it is handled by node-pre-gyp
If you inspect the nodejs package:
$ tar tvf deepspeech-0.10.0-alpha.3.tgz package/lib/binding/v0.10.0-alpha.3/ | grep darwin
-rwxr-xr-x 0/0 65788 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v10.0/deepspeech.node
-rwxr-xr-x 0/0 65788 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v10.1/deepspeech.node
-rwxr-xr-x 0/0 71668 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v11.0/deepspeech.node
-rwxr-xr-x 0/0 65796 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v5.0/deepspeech.node
-rwxr-xr-x 0/0 65844 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v6.0/deepspeech.node
-rwxr-xr-x 0/0 65844 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v6.1/deepspeech.node
-rwxr-xr-x 0/0 65844 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v7.0/deepspeech.node
-rwxr-xr-x 0/0 65844 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v7.1/deepspeech.node
-rwxr-xr-x 0/0 65844 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v8.0/deepspeech.node
-rwxr-xr-x 0/0 65908 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v9.0/deepspeech.node
-rwxr-xr-x 0/0 65908 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v9.1/deepspeech.node
-rwxr-xr-x 0/0 65908 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/electron-v9.2/deepspeech.node
-rwxr-xr-x 0/0 65500 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/node-v64/deepspeech.node
-rwxr-xr-x 0/0 65852 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/node-v67/deepspeech.node
-rwxr-xr-x 0/0 65764 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/node-v72/deepspeech.node
-rwxr-xr-x 0/0 65836 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/node-v79/deepspeech.node
-rwxr-xr-x 0/0 71772 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/node-v83/deepspeech.node
-rwxr-xr-x 0/0 71660 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/node-v88/deepspeech.node
-rwxr-xr-x 0/0 46259964 1985-10-26 09:15 package/lib/binding/v0.10.0-alpha.3/darwin-x64/libdeepspeech.so
We only have macOS amd64 binaries there, so if anything is running on your Mac M1, I doubt it’s ARM64 code, but rather translation from amd64. Who knows what can be broken in this case …