From 31d9ee439035c9932e8a6f6bbb90f83eac4eb881 Mon Sep 17 00:00:00 2001 From: ztimson Date: Sat, 13 Dec 2025 22:59:23 -0500 Subject: [PATCH] ASR Debugging --- package.json | 2 +- src/ai.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 667ec55..5c5f379 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/ai-utils", - "version": "0.1.10", + "version": "0.1.11", "description": "AI Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/ai.ts b/src/ai.ts index 35045b0..d72df06 100644 --- a/src/ai.ts +++ b/src/ai.ts @@ -46,6 +46,8 @@ export class Ai { const m = await this.downloadAsrModel(model); const name = Math.random().toString(36).substring(2, 10) + '-' + path.split('/').pop() + '.txt'; const output = Path.join(this.options.whisper.temp || '/tmp', name); + console.log(this.options.whisper?.model + ' -> ' + this.whisperModel); + console.log(`rm -f ${output} && ${this.options.whisper.binary} -nt -np -m ${m} -f ${path} -otxt -of ${output}`); await $`rm -f ${output} && ${this.options.whisper.binary} -nt -np -m ${m} -f ${path} -otxt -of ${output}`; return fs.readFile(output, 'utf-8').then(text => text?.trim() || null) .finally(() => fs.rm(output, {force: true}).catch(() => {}));