Skip to content

Commit 954bcd6

Browse files
committed
Revert "feat: add function to download models directly"
This reverts commit 5cc6624.
1 parent 5cc6624 commit 954bcd6

2 files changed

Lines changed: 1 addition & 19 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nodejs-whisper",
3-
"version": "0.0.10",
3+
"version": "0.0.8",
44
"description": "Node bindings for OpenAI's Whisper. Optimized for CPU.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/downloadModel.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,6 @@ export default async function downloadModel() {
3636
try {
3737
shell.cd(path.join(__dirname, '..', './cpp/whisper.cpp/models'))
3838

39-
const args = process.argv.slice(2)
40-
if (args.length > 0) {
41-
const modelName = args[0]
42-
console.log('Downloading model:', modelName)
43-
if (!MODELS_LIST.includes(modelName)) {
44-
throw `[Nodejs-whisper] Error: Model name not found. Check your spelling.`
45-
}
46-
let scriptPath = './download-ggml-model.sh'
47-
48-
if (process.platform === 'win32') scriptPath = 'download-ggml-model.cmd'
49-
shell.chmod('+x', scriptPath)
50-
shell.exec(`${scriptPath} ${modelName}`)
51-
console.log('[Nodejs-whisper] Attempting to compile model...\n')
52-
shell.cd('../')
53-
shell.exec('make')
54-
process.exit(0)
55-
}
56-
5739
let anyModelExist = []
5840

5941
MODELS.forEach(model => {

0 commit comments

Comments
 (0)