This library whisper-node-addon is currently in early experimental phase. APIs may change breakingly and production use is not recommended!
For stable & production-ready solutions, please use the mature library: ChetanXpro/nodejs-whisper 👈 or whisper.cpp
Automatic whisper.cpp bindings for Node.js & Electron across all platforms.
npm i whisper-node-addonimport { transcribe } from 'whisper-node-addon/dist'
const modelPath = path.resolve('./resources/models/ggml-base.bin')
// Transcribe audio
try {
const result = await transcribe({
language: 'zh',
model: modelPath,
fname_inp: tempFilePath,
translate: false
})
return result.reduce((pre, cur) => pre + (cur[2] || ''), '')
} catch (err) {
console.error('Error:', err)
return ''
}# Build binaries for all platforms
npm run buildMIT © 2025 starNGC2237