Skip to content

starNGC2237/whisper-node-addon

Repository files navigation

⚠️ Development Status Warning

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

whisper-node-addon 🌐🔉

npm version License: MIT

Automatic whisper.cpp bindings for Node.js & Electron across all platforms.

简体中文

✨ Features

📦 Installation

npm i whisper-node-addon

🚀 Usage

import { 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 from Source (Optional)

# Build binaries for all platforms
npm run build

📂 File Structure

🤝 Contributing

📜 TODO

⚖️ License

MIT © 2025 starNGC2237

About

Cross-platform auto-build whisper bindings

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors