fixing input device

This commit is contained in:
Matthias Hinrichs
2026-01-29 22:49:26 +01:00
parent 92a77ee944
commit a8a3ec9b9f
3 changed files with 72 additions and 71 deletions
+4 -1
View File
@@ -3,6 +3,7 @@ const picoKeyInput = document.getElementById('pico-key');
const brainUrlInput = document.getElementById('brain-url');
const wakeWordSelect = document.getElementById('wake-word');
const customWakeWordInput = document.getElementById('custom-wake-word');
const audioIndexInput = document.getElementById('audio-index');
const saveBtn = document.getElementById('save-btn');
const statusBadge = document.getElementById('status-badge');
const toast = document.getElementById('toast');
@@ -22,6 +23,7 @@ async function fetchConfig() {
brainUrlInput.value = data.brain_url || '';
wakeWordSelect.value = data.wake_word || 'porcupine';
customWakeWordInput.value = data.custom_wake_word_path || '';
audioIndexInput.value = data.audio_index || '';
if (wakeWordSelect.value === 'custom') {
customWakeWordInput.style.display = 'block';
@@ -66,7 +68,8 @@ saveBtn.addEventListener('click', async () => {
pico_key: picoKeyInput.value,
brain_url: brainUrlInput.value,
wake_word: wakeWordSelect.value,
custom_wake_word_path: customWakeWordInput.value
custom_wake_word_path: customWakeWordInput.value,
audio_index: audioIndexInput.value
};
try {