Let streamers name their AI assistant; fix overlay TTS audio overlap
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 30s
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 30s
Streamer dashboard gains an editable AI assistant name (default "Альтушка Ирина"), stored per-streamer and used for the overlay label, TTS intro, and DeepSeek system prompt. Also fixes a bug where a long message's TTS audio could still be playing when the next queued message started its own audio — the overlay queue now waits for the current audio to actually finish (not just the configured display duration) before advancing.
This commit is contained in:
parent
fec77e2737
commit
ec6d8c4cfe
6 changed files with 106 additions and 22 deletions
|
|
@ -6,6 +6,7 @@ const logoutBtn = document.getElementById('logout');
|
|||
const displayNameInput = document.getElementById('display-name');
|
||||
const messageInput = document.getElementById('message');
|
||||
const aiReplyCheckbox = document.getElementById('ai-reply');
|
||||
const aiReplyLabel = document.getElementById('ai-reply-label');
|
||||
const sendBtn = document.getElementById('send');
|
||||
const statusEl = document.getElementById('status');
|
||||
|
||||
|
|
@ -51,7 +52,16 @@ async function handleCredentialResponse(response) {
|
|||
}
|
||||
}
|
||||
|
||||
async function loadAiName() {
|
||||
const res = await fetch(`/api/streamer-info?token=${encodeURIComponent(token)}`);
|
||||
if (!res.ok) return;
|
||||
const { aiName } = await res.json();
|
||||
if (aiName) aiReplyLabel.textContent = `Задать вопрос: ${aiName} 🤖`;
|
||||
}
|
||||
|
||||
async function init() {
|
||||
loadAiName();
|
||||
|
||||
const configRes = await fetch('/config');
|
||||
const { googleClientId } = await configRes.json();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue