fixing input device
This commit is contained in:
@@ -61,6 +61,12 @@
|
||||
<input type="text" id="custom-wake-word" placeholder="/path/to/file.ppn" style="display: none; margin-top: 10px;" />
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="audio-index">Audio Device Index</label>
|
||||
<input type="number" id="audio-index" placeholder="z.B. 0" />
|
||||
<span class="input-hint">Index des Mikrofons (siehe Konsolen-Log).</span>
|
||||
</div>
|
||||
|
||||
<button id="save-btn" class="primary-btn">
|
||||
<span class="btn-text">Einstellungen speichern</span>
|
||||
<span class="loader"></span>
|
||||
|
||||
+4
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user