From 604e029390aad8bcdb3bf75c8abc514a1a3a5eab 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server.js b/src/server.js index 3314c9a..1536db7 100644 --- a/src/server.js +++ b/src/server.js @@ -9,13 +9,13 @@ const redis = models.redis; const config = require("./config"); // Send Speech to Text to Redis Stream -const sendTranscriptEvent = async (streamKey, type, text) => { +const sendTranscriptEvent = async (streamKey, device_id, text) => { await redis.client.xAdd( streamKey, '*', { text: text, - type: type + device_id: device_id } ) @@ -26,7 +26,7 @@ const sendTranscriptEvent = async (streamKey, type, text) => { const processor = async (group, consumer, streamKey) => { await redis.client.connect().catch(console.error); - sendTranscriptEvent("speech:events", "TEST", "TEST"); + sendTranscriptEvent("transcripts", config.DEVICE_ID, "TEST"); while (true) { const res = await redis.client.xReadGroup( @@ -51,9 +51,9 @@ const processor = async (group, consumer, streamKey) => { } const main = async () => { - await redis.ensureGroup("speech:commands", `${config.DEVICE_ID}-cg`); + await redis.ensureGroup("commands", 'assistant'); - processor(`${config.DEVICE_ID}-cg`, `${config.DEVICE_ID}-consumer`, "speech:commands"); + processor('assistant', `${config.DEVICE_ID}`, "commands"); } main().catch(console.error); \ No newline at end of file