whisper-node
whisper-node copied to clipboard
Could not find a declaration file for module 'whisper-node'.
Following the instructions in the Readme, I get:
╰─(base) ⠠⠵ ts-node src/process_scenes.ts --node on master↑1|✚16…17
Error preparing scenes: src/lib/Bark.ts:5:32 - error TS7016: Could not find a declaration file for module 'whisper-node'. '/home/arthur/dev/ai/manga/node_modules/whisper-node/dist/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/whisper-node` if it exists or add a new declaration (.d.ts) file containing `declare module 'whisper-node';`
5 import whisper from 'whisper-node';
~~~~~~~~~~~~~~
I tried npm i --save-dev @types/whisper-node
and got nothing more.
Any ideas?
Thanks.
PS: My tsconfig in case it's relevant:
{
"compilerOptions": {
"strict": true,
"noImplicitAny": true,
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
}
}
PS: doing:
// @ts-ignore
import whisper from 'whisper-node';
solves the problem temporarily, but I'd really like a "clean" way out.
then when I am able to run it I have another problem:
/ram/runner/bark-text-reader-2ksgcnjtjt6//example.wav
[whisper-node] Transcribing: /ram/runner/bark-text-reader-2ksgcnjtjt6//example.wav
[whisper-node] No 'modelName' or 'modelPath' provided. Trying default model: base.en
[whisper-node] Problem: TypeError: Cannot read properties of null (reading 'shift')
at parseTranscript (/home/arthur/dev/ai/manga/node_modules/whisper-node/src/tsToArray.ts:12:9)
at /home/arthur/dev/ai/manga/node_modules/whisper-node/src/index.ts:35:46
at Generator.next (<anonymous>)
at fulfilled (/home/arthur/dev/ai/manga/node_modules/whisper-node/dist/index.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
undefined