added voice settings in adroid app and diagnostic, higlight trigger in app und diagnostic

change voicec
This commit is contained in:
2026-03-29 17:41:28 +02:00
parent bbd02d46a6
commit eb72b35e23
6 changed files with 84 additions and 11 deletions
+20
View File
@@ -549,6 +549,18 @@ function connectRVS(forcePlain) {
});
}
function sendToRVS_raw(msgObj) {
if (!RVS_HOST || !RVS_TOKEN) return;
const proto = RVS_TLS === "true" ? "wss" : "ws";
const url = `${proto}://${RVS_HOST}:${RVS_PORT}?token=${RVS_TOKEN}`;
const freshWs = new WebSocket(url);
freshWs.on("open", () => {
freshWs.send(JSON.stringify(msgObj));
setTimeout(() => { try { freshWs.close(); } catch (_) {} }, 5000);
});
freshWs.on("error", () => {});
}
function sendToRVS(text, isPipeline) {
if (!RVS_HOST || !RVS_TOKEN) {
log("error", "rvs", "Nicht konfiguriert");
@@ -1147,6 +1159,14 @@ wss.on("connection", (ws) => {
if (ws._sshSock) ws._sshSock.write(msg.data);
} else if (msg.action === "live_ssh_close") {
if (ws._sshSock) { ws._sshSock.end(); ws._sshSock = null; }
} else if (msg.action === "send_voice_config") {
// Stimmen-Config an Bridge via RVS senden
sendToRVS_raw({ type: "config", payload: {
defaultVoice: msg.defaultVoice,
highlightVoice: msg.highlightVoice,
ttsEnabled: msg.ttsEnabled,
}, timestamp: Date.now() });
log("info", "server", `Voice-Config gesendet: default=${msg.defaultVoice}, highlight=${msg.highlightVoice}, tts=${msg.ttsEnabled}`);
} else if (msg.action === "get_triggers") {
handleGetTriggers(ws);
} else if (msg.action === "save_triggers") {