From aa00d45eef7b608b5562dcb2e9b7384a7d5faa38 Mon Sep 17 00:00:00 2001 From: Apher Date: Sun, 5 Jul 2026 06:01:14 +0000 Subject: [PATCH] Change attribute and stream names. --- src/server.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/server.js b/src/server.js index 188935b..3e35d2c 100644 --- a/src/server.js +++ b/src/server.js @@ -15,8 +15,9 @@ const handleIntent = async (streamKey, intent) => { streamKey, '*', { - intent_id: intent.id, - command: "INTENT_RECEIVED" + transcript_id: intent.id, + command: "[TEST] INTENT_RECEIVED", + device_id: intent.message.device_id } ) console.log("TODO: Handle Intents", intent); @@ -39,7 +40,7 @@ const processor = async (group, consumer, streamKey) => { for (const msg of stream.messages) { console.log(`[${consumer}] Processing:`, msg); - await handleIntent("speech:commands", msg); + await handleIntent("commands", msg); await redis.client.xAck(streamKey, group, msg.id); } @@ -56,9 +57,10 @@ const main = async () => { await sequelize.sync({force: doForce}); if (doForce) console.info("Database dropped and resynced (force=true)."); - await redis.ensureGroup("speech:events", `${config.DEVICE_ID}-cg`); + await redis.ensureGroup("transcripts", 'nlp'); + await redis.ensureGroup("commands", 'nlp'); - processor(`${config.DEVICE_ID}-cg`, `${config.DEVICE_ID}-consumer`, "speech:events"); + processor('nlp', `${config.DEVICE_ID}`, "transcripts"); } main().catch(console.error);