open-agents-ai 0.187.336 → 0.187.337
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/dist/index.js +13 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -278120,17 +278120,20 @@ function findLiveWhisperScript() {
|
|
|
278120
278120
|
}
|
|
278121
278121
|
return null;
|
|
278122
278122
|
}
|
|
278123
|
-
function
|
|
278123
|
+
function ensureVenvForTranscribeCli() {
|
|
278124
278124
|
const bin = process.platform === "win32" ? "Scripts" : "bin";
|
|
278125
|
+
const exe = process.platform === "win32" ? "python.exe" : "python3";
|
|
278125
278126
|
const venvBin = join69(homedir24(), ".open-agents", "venv", bin);
|
|
278126
|
-
|
|
278127
|
+
const venvPython2 = join69(venvBin, exe);
|
|
278128
|
+
if (!existsSync53(venvPython2)) return false;
|
|
278129
|
+
process.env.TRANSCRIBE_PYTHON = venvPython2;
|
|
278127
278130
|
const pathSep2 = process.platform === "win32" ? ";" : ":";
|
|
278128
278131
|
const currentPath = process.env.PATH || "";
|
|
278129
278132
|
if (!currentPath.split(pathSep2).includes(venvBin)) {
|
|
278130
278133
|
process.env.PATH = `${venvBin}${pathSep2}${currentPath}`;
|
|
278131
278134
|
}
|
|
278132
278135
|
try {
|
|
278133
|
-
execSync44(
|
|
278136
|
+
execSync44(`"${venvPython2}" -c "import numpy"`, { stdio: "pipe", timeout: 1e4 });
|
|
278134
278137
|
return true;
|
|
278135
278138
|
} catch {
|
|
278136
278139
|
return false;
|
|
@@ -278461,7 +278464,7 @@ var init_listen = __esm({
|
|
|
278461
278464
|
if (tc) {
|
|
278462
278465
|
const TranscribeLive = tc.TranscribeLive;
|
|
278463
278466
|
if (TranscribeLive) {
|
|
278464
|
-
const venvReady =
|
|
278467
|
+
const venvReady = ensureVenvForTranscribeCli();
|
|
278465
278468
|
if (!venvReady) {
|
|
278466
278469
|
transcribeCliError = "venv Python missing numpy (required by transcribe-cli) — using whisper fallback";
|
|
278467
278470
|
} else {
|
|
@@ -278653,7 +278656,7 @@ transcribe-cli error: ${transcribeCliError}` : "";
|
|
|
278653
278656
|
} catch {
|
|
278654
278657
|
}
|
|
278655
278658
|
}
|
|
278656
|
-
if (tc?.TranscribeLive &&
|
|
278659
|
+
if (tc?.TranscribeLive && ensureVenvForTranscribeCli()) {
|
|
278657
278660
|
try {
|
|
278658
278661
|
const transcriber = new tc.TranscribeLive({
|
|
278659
278662
|
model: this.config.model,
|
|
@@ -278707,7 +278710,7 @@ transcribe-cli error: ${transcribeCliError}` : "";
|
|
|
278707
278710
|
}
|
|
278708
278711
|
}
|
|
278709
278712
|
if (!tc) return null;
|
|
278710
|
-
|
|
278713
|
+
ensureVenvForTranscribeCli();
|
|
278711
278714
|
try {
|
|
278712
278715
|
const result = await tc.transcribe(filePath, {
|
|
278713
278716
|
model: this.config.model,
|
|
@@ -297362,8 +297365,10 @@ async function ensureVoiceDeps(ctx3) {
|
|
|
297362
297365
|
if (typeof mod2.getVenvPython === "function") {
|
|
297363
297366
|
const { dirname: dirname32 } = await import("node:path");
|
|
297364
297367
|
const { existsSync: existsSync87 } = await import("node:fs");
|
|
297365
|
-
const
|
|
297366
|
-
if (existsSync87(
|
|
297368
|
+
const venvPy = mod2.getVenvPython();
|
|
297369
|
+
if (existsSync87(venvPy)) {
|
|
297370
|
+
process.env.TRANSCRIBE_PYTHON = venvPy;
|
|
297371
|
+
const venvBin = dirname32(venvPy);
|
|
297367
297372
|
const sep = process.platform === "win32" ? ";" : ":";
|
|
297368
297373
|
const cur = process.env.PATH || "";
|
|
297369
297374
|
if (!cur.split(sep).includes(venvBin)) {
|
package/package.json
CHANGED