@daolmedo/openclaw-twilio-whatsapp 1.1.7 → 1.1.9
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 +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -177,7 +177,7 @@ var twilioWhatsappPlugin = {
|
|
|
177
177
|
// src/http-routes.ts
|
|
178
178
|
import { dispatchInboundDirectDmWithRuntime } from "openclaw/plugin-sdk/direct-dm";
|
|
179
179
|
import { saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
|
|
180
|
-
import { transcribeFirstAudio } from "openclaw/plugin-sdk/media-
|
|
180
|
+
import { transcribeFirstAudio } from "openclaw/plugin-sdk/media-runtime";
|
|
181
181
|
|
|
182
182
|
// src/webhook.ts
|
|
183
183
|
import twilio2 from "twilio";
|
|
@@ -356,6 +356,7 @@ function registerTwilioWhatsappHttpRoutes(api) {
|
|
|
356
356
|
let bodyForAgent = messageText || void 0;
|
|
357
357
|
const hasAudio = resolvedMedia.some((m) => m.contentType.startsWith("audio/"));
|
|
358
358
|
if (hasAudio) {
|
|
359
|
+
console.log("[twilio-whatsapp] Audio detected, attempting transcription. Media:", resolvedMedia.map((m) => `${m.path} (${m.contentType})`));
|
|
359
360
|
try {
|
|
360
361
|
const transcript = await transcribeFirstAudio({
|
|
361
362
|
ctx: {
|
|
@@ -364,6 +365,7 @@ function registerTwilioWhatsappHttpRoutes(api) {
|
|
|
364
365
|
},
|
|
365
366
|
cfg: stored.cfg
|
|
366
367
|
});
|
|
368
|
+
console.log("[twilio-whatsapp] Transcription result:", transcript);
|
|
367
369
|
bodyForAgent = transcript || messageText || "<media:audio>";
|
|
368
370
|
} catch (err) {
|
|
369
371
|
console.error("[twilio-whatsapp] Audio transcription failed:", err);
|