From 9b831f7d955b56d9aaeb094d5d5d9707bd15e735 Mon Sep 17 00:00:00 2001 From: ztimson Date: Fri, 20 Feb 2026 16:55:25 -0500 Subject: [PATCH] Better ASR IDing --- package.json | 2 +- src/audio.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 68bbdd3..a5aaa76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/ai-utils", - "version": "0.7.4", + "version": "0.7.5", "description": "AI Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/audio.ts b/src/audio.ts index 2621d08..3d05cad 100644 --- a/src/audio.ts +++ b/src/audio.ts @@ -42,8 +42,8 @@ export class Audio { if(!transcript) return transcript; let chunks = this.ai.language.chunk(transcript, 500, 0); if(chunks.length > 4) chunks = [...chunks.slice(0, 3), chunks.at(-1)]; - const names = await this.ai.language.json(chunks.join('\n'), '{1: "Detected Name"}', { - system: 'Use this following transcript to identify speakers. Only identify speakers you are sure about', + const names = await this.ai.language.json(chunks.join('\n'), '{1: "Detected Name", 2: "Second Name"}', { + system: 'Use the following transcript to identify speakers. Only identify speakers you are positive about, dont mention speakers you are unsure about in your response', temperature: 0.1, }); Object.entries(names).forEach(([speaker, name]) => {