serenadeai / speech-recorder

speech-recorder is a node.js module for streaming audio from a device's microphone and filtering for speech.
MIT License
87 stars 19 forks source link

Issue running on M1 Mac #34

Open halfperim opened 1 year ago

halfperim commented 1 year ago

Hi,

I am currently trying to implement the speech-recorder Voice Activity Detection in my electron App on my M1 Mac and I am facing the current issue : Error: dlopen(/myElectronPath/node_modules/speech-recorder/build/Release/speechrecorder.node, 0x0001): tried: '/myElectronPath/node_modules/speech-recorder/build/Release/speechrecorder.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/myElectronPath/node_modules/speech-recorder/build/Release/speechrecorder.node' (no such file), '/myElectronPath/node_modules/speech-recorder/build/Release/speechrecorder.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

Do you have any suggestion to address this issue and make the module work on Apple Silicon which has an arm64 architecture? Thanks in advance!

Edit: Managed to make it work by opening VS Code with Rosetta. However this seems to be a rather "dirty" way of doing it, and I am not sure whether or not this will work when exporting my Electron App. If you have any "clean" suggestions, I'd love to hear about them! By the way, the library is really great, and does not get fooled by noises like finger snapping.

joris-delorme commented 1 year ago

I have the same issue... Have you found any answers ?

iamdenny commented 4 months ago

I have the same issue too.