add sendTranscriptEvent

This commit is contained in:
Apher 2026-07-17 00:39:22 +00:00
parent e41a75e743
commit b335675847

View File

@ -31,6 +31,19 @@ redis.ensureGroup = async (stream, group) => {
} }
} }
redis.sendTranscriptEvent = async (streamKey, device_id, text) => {
try {
await redis.client.xAdd(streamKey, "*", {
text,
device_id: device_id,
});
console.log("Transcript added to stream");
} catch (err) {
console.error(err);
}
}
module.exports = { module.exports = {
redis redis
} }