agentgui 1.0.299 → 1.0.300

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build-portable.js CHANGED
@@ -111,6 +111,12 @@ copyDir(path.join(hfNmSrc, 'onnxruntime-common'), path.join(hfNmDest, 'onnxrunti
111
111
  log('Copying webtalk...');
112
112
  copyDir(path.join(nm, 'webtalk'), path.join(destNm, 'webtalk'));
113
113
 
114
+ log('Copying audio-decode...');
115
+ copyDir(path.join(nm, 'audio-decode'), path.join(destNm, 'audio-decode'));
116
+ const audioDeps = new Set();
117
+ collectDeps('audio-decode', audioDeps);
118
+ for (const dep of audioDeps) copyPkg(dep);
119
+
114
120
  log('Copying @anthropic-ai/claude-code ripgrep (win32)...');
115
121
  const claudeSrc = path.join(nm, '@anthropic-ai', 'claude-code');
116
122
  const claudeDest = path.join(destNm, '@anthropic-ai', 'claude-code');
package/lib/speech.js CHANGED
@@ -14,7 +14,7 @@ let serverSTT = null;
14
14
  let audioDecode = null;
15
15
  let ttsUtils = null;
16
16
 
17
- try { serverTTS = require('webtalk/server-tts'); } catch(e) { console.warn('[TTS] webtalk/server-tts unavailable:', e.message); }
17
+ try { serverTTS = require('webtalk/server-tts-onnx'); } catch(e) { console.warn('[TTS] webtalk/server-tts-onnx unavailable:', e.message); }
18
18
  try { serverSTT = require('webtalk/server-stt'); } catch(e) { console.warn('[STT] webtalk/server-stt unavailable:', e.message); }
19
19
  try { audioDecode = require('audio-decode'); } catch(e) { console.warn('[TTS] audio-decode unavailable:', e.message); }
20
20
  try { ttsUtils = require('webtalk/tts-utils'); } catch(e) {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.299",
3
+ "version": "1.0.300",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -86,7 +86,20 @@ async function ensureModelsDownloaded() {
86
86
  });
87
87
 
88
88
  const { checkTTSModelExists } = createRequire(import.meta.url)('webtalk/tts-models');
89
- const { checkWhisperModelExists } = createRequire(import.meta.url)('webtalk/whisper-models');
89
+ const whisperModelsLib = createRequire(import.meta.url)('webtalk/whisper-models');
90
+ const checkWhisperModelExists = whisperModelsLib.checkWhisperModelExists || (async (modelName, cfg) => {
91
+ const { isFileCorrupted } = whisperModelsLib;
92
+ const modelDir = path.join(cfg.modelsDir, modelName);
93
+ if (!fs.existsSync(modelDir)) return false;
94
+ const encoderPath = path.join(modelDir, 'onnx', 'encoder_model.onnx');
95
+ const decoderPath = path.join(modelDir, 'onnx', 'decoder_model_merged_q4.onnx');
96
+ const decoderFallback = path.join(modelDir, 'onnx', 'decoder_model_merged.onnx');
97
+ const hasEncoder = fs.existsSync(encoderPath);
98
+ const hasDecoder = fs.existsSync(decoderPath) || fs.existsSync(decoderFallback);
99
+ if (!hasEncoder || !hasDecoder) return false;
100
+ return !isFileCorrupted(encoderPath, 40 * 1024 * 1024) &&
101
+ (!isFileCorrupted(decoderPath, 100 * 1024 * 1024) || !isFileCorrupted(decoderFallback, 100 * 1024 * 1024));
102
+ });
90
103
 
91
104
  const sttOk = await checkWhisperModelExists(config.defaultWhisperModel, config).catch(() => false);
92
105
  const ttsOk = await checkTTSModelExists(config).catch(() => false);