node.script Error in Speech-to-Text-Application
Christopher
Mar 01 2023 | 8:07 pm
Hi guys n gals,
I have pasted together, with all my love, this .js-file to run in node.script. (absolute Javascript rookie).
Via node-record-lpcm16 it accesses the microphone and streams the audio to the Deepgram API. The latter transcribes it and it shall be output as text through node.script’s outlet to MAX. Deepgram takes care of all the parsing and endpoints of speech, good quality stuff!
Running the .js through node in terminal works (therein not running the maxApi-part, of course), but when running in node.script it crashes with the debugger saying:
Error: spawn sox ENOENT
at Process.ChildProcess.handle.onexit (node.internal/child_process:282:19)
at onErrorNT (node:internal/chil_process:480:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
I’d be so happy if anyone had any ideas… Or alternatives how to access a microphone for the Deepgram API.
(Of course I have an API key, runninng LTS of node, all the packages are installed – maybe it is some file localization trouble?)
Thanks,
Chris