From 5bd41f8c6a4b0d9dca2b3a67934097e48350ad92 Mon Sep 17 00:00:00 2001 From: ztimson Date: Thu, 12 Feb 2026 20:17:31 -0500 Subject: [PATCH] worker fix? --- package.json | 2 +- src/asr.ts | 1 + src/audio.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c52ba5..62efdd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/ai-utils", - "version": "0.6.7", + "version": "0.6.7-rc.1", "description": "AI Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/asr.ts b/src/asr.ts index 57a42f9..1bfa874 100644 --- a/src/asr.ts +++ b/src/asr.ts @@ -84,6 +84,7 @@ function combineSpeakerTranscript(chunks: any[], speakers: any[]): string { parentPort?.on('message', async ({ file, speaker, model, modelDir }) => { try { + console.log('worker', file); if(!whisperPipeline) whisperPipeline = await pipeline('automatic-speech-recognition', `Xenova/${model}`, {cache_dir: modelDir, quantized: true}); // Prepare audio file (convert to mono channel wave) diff --git a/src/audio.ts b/src/audio.ts index 5dd523f..21cf027 100644 --- a/src/audio.ts +++ b/src/audio.ts @@ -7,6 +7,7 @@ export class Audio { constructor(private ai: Ai) {} asr(file: string, options: { model?: string; speaker?: boolean } = {}): AbortablePromise { + console.log('audio', file); const { model = this.ai.options.asr || 'whisper-base', speaker = false } = options; let aborted = false; const abort = () => { aborted = true; };