switching to high quality piper tts and added label translations
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
async function fetchInfo() {
|
||||
try {
|
||||
const response = await fetch('/api/info');
|
||||
const data = await response.json();
|
||||
document.getElementById('brain-ip').textContent = `${data.ip}:${data.port}`;
|
||||
document.getElementById('brain-host').textContent = data.hostname;
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Abrufen der Info:', error);
|
||||
}
|
||||
}
|
||||
|
||||
async function updateDashboard() {
|
||||
try {
|
||||
const response = await fetch('/api/latest');
|
||||
const data = await response.json();
|
||||
|
||||
if (data.timestamp) {
|
||||
document.getElementById('last-update').textContent = data.timestamp;
|
||||
document.getElementById('room-name').textContent = data.room;
|
||||
document.getElementById('analysis-text').textContent = data.comment;
|
||||
|
||||
const img = document.getElementById('latest-image');
|
||||
if (data.image_url) {
|
||||
img.src = data.image_url;
|
||||
img.classList.remove('fallback-img');
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Abrufen der Daten:', error);
|
||||
}
|
||||
}
|
||||
|
||||
// Alle 2 Sekunden aktualisieren
|
||||
setInterval(updateDashboard, 2000);
|
||||
|
||||
// Initialer Aufruf
|
||||
fetchInfo();
|
||||
updateDashboard();
|
||||
Reference in New Issue
Block a user