@ducci/jarvis 1.0.89 → 1.0.90

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ducci/jarvis",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "A fully automated agent system that lives on a server.",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -716,6 +716,7 @@ export async function startTelegramChannel(config) {
716
716
  }
717
717
  } catch (e) {
718
718
  console.error(`[telegram] TTS error chat_id=${chatId}: ${e.message}`);
719
+ await api.sendMessage(chatId, `[TTS error: ${e.message}]`).catch(() => {});
719
720
  }
720
721
  }
721
722
  } else {
@@ -8,7 +8,6 @@ import { promisify } from 'util';
8
8
  import { writeFile, readFile, unlink } from 'fs/promises';
9
9
  import { tmpdir } from 'os';
10
10
  import { join } from 'path';
11
- import { Readable } from 'stream';
12
11
  const execAsync = promisify(exec);
13
12
 
14
13
  // System prompt for TTS summary generation.
@@ -90,13 +89,7 @@ export async function textToSpeech(text, config) {
90
89
  throw new Error(`fish.audio TTS ${response.status}: ${errText.slice(0, 200)}`);
91
90
  }
92
91
 
93
- // fish.audio streams audio via chunked transfer encoding — arrayBuffer() only
94
- // returns the first chunk. Collect all chunks via a Node.js stream.
95
- const chunks = [];
96
- for await (const chunk of Readable.fromWeb(response.body)) {
97
- chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
98
- }
99
- return Buffer.concat(chunks);
92
+ return Buffer.from(await response.arrayBuffer());
100
93
  }
101
94
 
102
95
  /**