diff --git a/dashboard/frontend/src/lib/voice.js b/dashboard/frontend/src/lib/voice.js index 2940f93..e0752e0 100644 --- a/dashboard/frontend/src/lib/voice.js +++ b/dashboard/frontend/src/lib/voice.js @@ -8,6 +8,7 @@ export class VoiceSession { this.ttsEnabled = false; this.speaking = false; this.listening = false; + this.sttAvailable = !!(window.SpeechRecognition || window.webkitSpeechRecognition); this.langIdx = 0; this.term = null; this.ws = null; diff --git a/dashboard/frontend/src/routes/Terminal.svelte b/dashboard/frontend/src/routes/Terminal.svelte index dbd5743..f791dda 100644 --- a/dashboard/frontend/src/routes/Terminal.svelte +++ b/dashboard/frontend/src/routes/Terminal.svelte @@ -142,37 +142,36 @@ {/if} - {#if activeTab && tabs.find(t => t.id === activeTab)?.connected} + {#if activeTab && tabs.find(t => t.id === activeTab)?.connected && activeVoice()} {@const v = activeVoice()} - {#if v} -
- - - -
- {/if} +
+ + + +
{/if}