@alfe.ai/openclaw-voice 0.0.4 → 0.0.6
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/plugin.d.ts +1 -1
- package/dist/plugin.js +19 -14
- package/package.json +2 -2
package/dist/plugin.d.ts
CHANGED
package/dist/plugin.js
CHANGED
|
@@ -138,23 +138,28 @@ const plugin = {
|
|
|
138
138
|
name: "Alfe Voice Plugin",
|
|
139
139
|
description: "Voice integration — TTS/STT via the voice service, channel-specific operations via channel services",
|
|
140
140
|
version: "0.2.0",
|
|
141
|
-
|
|
142
|
-
if (globalThis.__voiceGatewayActivated) {
|
|
143
|
-
api.logger.debug("Alfe Voice plugin already activated, skipping re-init");
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
globalThis.__voiceGatewayActivated = true;
|
|
141
|
+
activate(api) {
|
|
147
142
|
const log = api.logger;
|
|
148
|
-
log.info("Alfe Voice plugin activating...");
|
|
149
|
-
const fullConfig = api.config ?? {};
|
|
150
|
-
const pluginConfig = fullConfig.plugins?.entries?.["@alfe.ai/openclaw-voice"]?.config ?? fullConfig.plugins?.entries?.["voice-gateway"]?.config ?? {};
|
|
151
|
-
voiceServiceUrl = pluginConfig.voiceServiceUrl ?? `http://localhost:${String(pluginConfig.voiceServicePort ?? "3100")}`;
|
|
152
|
-
voiceServiceApiKey = pluginConfig.voiceServiceApiKey ?? "";
|
|
153
|
-
log.info(`Voice service: ${voiceServiceUrl}`);
|
|
154
|
-
const alfeConfig = await resolveConfig().catch(() => null);
|
|
155
|
-
daemonIpcClient = await connectToDaemon(pluginConfig.daemonSocket ?? alfeConfig?.socketPath ?? DEFAULT_SOCKET_PATH, log);
|
|
156
143
|
for (const tool of voiceTools) api.registerTool(tool);
|
|
157
144
|
log.info(`Registered ${String(voiceTools.length)} voice tools: ${voiceTools.map((t) => t.name).join(", ")}`);
|
|
145
|
+
if (!globalThis.__voiceGatewayActivated) {
|
|
146
|
+
globalThis.__voiceGatewayActivated = true;
|
|
147
|
+
log.info("Alfe Voice plugin activating...");
|
|
148
|
+
const fullConfig = api.config ?? {};
|
|
149
|
+
const pluginConfig = fullConfig.plugins?.entries?.["@alfe.ai/openclaw-voice"]?.config ?? fullConfig.plugins?.entries?.["voice-gateway"]?.config ?? {};
|
|
150
|
+
voiceServiceUrl = pluginConfig.voiceServiceUrl ?? `http://localhost:${String(pluginConfig.voiceServicePort ?? "3100")}`;
|
|
151
|
+
voiceServiceApiKey = pluginConfig.voiceServiceApiKey ?? "";
|
|
152
|
+
log.info(`Voice service: ${voiceServiceUrl}`);
|
|
153
|
+
let alfeConfig = null;
|
|
154
|
+
try {
|
|
155
|
+
alfeConfig = resolveConfig();
|
|
156
|
+
} catch {}
|
|
157
|
+
connectToDaemon(pluginConfig.daemonSocket ?? alfeConfig?.socketPath ?? DEFAULT_SOCKET_PATH, log).then((client) => {
|
|
158
|
+
daemonIpcClient = client;
|
|
159
|
+
}).catch((err) => {
|
|
160
|
+
log.debug(`Daemon connect failed: ${err.message}`);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
158
163
|
api.registerGatewayMethod("voice.speak", async (...args) => {
|
|
159
164
|
const { text } = args[0];
|
|
160
165
|
log.info(`voice.speak RPC → text=${text?.slice(0, 50) ?? "(none)"}...`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/openclaw-voice",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "OpenClaw voice plugin for Alfe — Discord audio, Twilio, Recall.ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@sinclair/typebox": "^0.34.48",
|
|
29
|
-
"@alfe.ai/config": "0.0.
|
|
29
|
+
"@alfe.ai/config": "0.0.6"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsdown",
|