Skip to content

node : add win platform check for require path #3363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danbev
Copy link
Member

@danbev danbev commented Aug 4, 2025

This commit adds a check to the platform in use and adjust the path to the addon.node shared library.

The motivation for this change is that on windows addon.node library is built into build\bin\Release and on linux into build/Release.

Resolves: #3360


With this change I'm able to run the example using the following command:

> node index.js --language='en' --model='../../models/ggml-base.en.bin' --fname_inp='../../samples/jfk.wav'
whisperParams = {
  language: 'en',
  model: '../../models/ggml-base.en.bin',
  fname_inp: '../../samples/jfk.wav',
  use_gpu: true,
  flash_attn: false,
  no_prints: true,
  comma_in_time: false,
  translate: true,
  no_timestamps: false,
  detect_language: false,
  audio_ctx: 0,
  max_len: 0,
  progress_callback: [Function: progress_callback]
}
progress: 0%

progress: 100%

{
  transcription: [
    [
      '00:00:00.000',
      '00:00:11.000',
      ' And so my fellow Americans, ask not what your country can do for you, ask what you can do for your country.'
    ]
  ]
}

This commit adds a check to the platform in use and adjust the path to
the addon.node shared library.

The motivation for this change is that on windows addon.node library is
built into build\bin\Release and on linux into build/Release.

Resolves: ggml-org#3360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An error occurred when running the addon.node example: failed to initialize whisper context
1 participant