GithubHelp home page GithubHelp logo

Comments (7)

gabrielmicko avatar gabrielmicko commented on June 11, 2024 1

Other problems I found:
In the example index.js file the source of whisper-node is wrong. Changed ../../build/Release/whisper-addon to ../../build/bin/Release/whisper-addon.node. I had to also download the model, but that is fine.

When I ran the example, I got the following error:

node:internal/util:375
      ReflectApply(original, this, args);
      ^

TypeError: A boolean was expected

I looked into addon.cpp, and I think no_timestamps is also needed as params. I added it and the example worked.

from whisper.cpp.

gabrielmicko avatar gabrielmicko commented on June 11, 2024

Hey @pprobst thank you for creating an issue on this and referencing it. It works. I have one question. Do you know how could I build for node, but it should use the GPU (cuda) instead of CPU.

from whisper.cpp.

pprobst avatar pprobst commented on June 11, 2024

Hey @pprobst thank you for creating an issue on this and referencing it. It works. I have one question. Do you know how could I build for node, but it should use the GPU (cuda) instead of CPU.

Hmm, to be fair in my use case I have only been using the node addon with CPU, and I'm not very experienced with node myself. Do you mean that it's not compiling for GPU?

Other problems I found: In the example index.js file the source of whisper-node is wrong. Changed ../../build/Release/whisper-addon to ../../build/bin/Release/whisper-addon.node. I had to also download the model, but that is fine.

When I ran the example, I got the following error:

node:internal/util:375
      ReflectApply(original, this, args);
      ^

TypeError: A boolean was expected

I looked into addon.cpp, and I think no_timestamps is also needed as params. I added it and the example worked.

Correct, no_timestamps should be passed as a parameter. In fact, I added the no_timestamps option recently as a PR 😅, so the existing example is outdated. I think it's important enough to be a parameter, since there's quite a big difference in WER when it comes to using or not timestamps (see #1724 (comment)).

from whisper.cpp.

gabrielmicko avatar gabrielmicko commented on June 11, 2024

Hey @pprobst I meant using GPU and CUDA, I am not sure how that works. What to do to speed up the process. My goal is to create text as fast as possible for few second recordings. I am trying to record air traffic control communication and turn it into text. I have tried using smart-whisper npm library with base.en model but it is slow and messages fall behind. It is good in a sense that it loads the model only once so I don't wase time with that, but also the quality is pretty inaccurate. I run windows and RTX4090, Procesor AMD Ryzen 9 7950X.

from whisper.cpp.

pprobst avatar pprobst commented on June 11, 2024

You can set use_gpu to true, but it's supposed to be true by default, so you're already using GPU if you have CUDA. Check your outputs and GPU usage to see if it's using your GPU.

EDIT: made a PR #2115.

from whisper.cpp.

tom-leamon avatar tom-leamon commented on June 11, 2024

Other problems I found: In the example index.js file the source of whisper-node is wrong. Changed ../../build/Release/whisper-addon to ../../build/bin/Release/whisper-addon.node. I had to also download the model, but that is fine.

When I ran the example, I got the following error:

node:internal/util:375
      ReflectApply(original, this, args);
      ^

TypeError: A boolean was expected

I looked into addon.cpp, and I think no_timestamps is also needed as params. I added it and the example worked.

The path is still incorrect in the most recent commit. This still needs to be fixed. When I changed it to ../../build/bin/Release/addon.node as suggested, it worked.

from whisper.cpp.

pprobst avatar pprobst commented on June 11, 2024

I cannot replicate this error here. For reference, what I do is:

  1. Inside examples/addon.node, I run npm install.
  2. In the whisper.cpp root directory, I run npx cmake-js compile -T addon.node -B Release.
  3. cd examples/addon.node again and run node index.js.

from whisper.cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.