Open PeterCarragher opened 4 months ago
Same issue here.
If you're using ESM imports, the workaround above won't work for you since all the imports are pulled in before the script runs.
Instead, I'm defaulting to requiring an absolute path for my script.
Instead:
node transcribe.js ./test.wav
My script is requiring:
node transcribe.js ~/path/to/test.wav
This won't work for all use cases, but for the automation I'm building it's fine.
Importing whisper-node package changes process.cwd(). Verison of whisper used to repro (includes a recent patch): "@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
leads to: [whisper-node] Transcribing:/node_modules/whisper-node/lib/whisper.cpp/
Whereas the desired behavior is for process.cwd() to be set to the. The following import ordering is a workaround:
which leads to: [whisper-node] Transcribing:/