added voice settings in adroid app and diagnostic, higlight trigger in app und diagnostic
change voicec
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user