From 78f69479a3f2625109acfc8ac0bfba0cedae2b36 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 18 Jan 2026 20:49:17 +0100 Subject: [PATCH] Add preparation state to VoiceRecorder component --- app/MindWork AI Studio/Components/VoiceRecorder.razor | 2 +- app/MindWork AI Studio/Components/VoiceRecorder.razor.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/MindWork AI Studio/Components/VoiceRecorder.razor b/app/MindWork AI Studio/Components/VoiceRecorder.razor index fb7a1334..e247f439 100644 --- a/app/MindWork AI Studio/Components/VoiceRecorder.razor +++ b/app/MindWork AI Studio/Components/VoiceRecorder.razor @@ -6,7 +6,7 @@ @if (PreviewFeatures.PRE_SPEECH_TO_TEXT_2026.IsEnabled(this.SettingsManager) && !string.IsNullOrWhiteSpace(this.SettingsManager.ConfigurationData.App.UseTranscriptionProvider)) { - @if (this.isTranscribing) + @if (this.isTranscribing || this.isPreparing) { } diff --git a/app/MindWork AI Studio/Components/VoiceRecorder.razor.cs b/app/MindWork AI Studio/Components/VoiceRecorder.razor.cs index c7d99e21..8b58035b 100644 --- a/app/MindWork AI Studio/Components/VoiceRecorder.razor.cs +++ b/app/MindWork AI Studio/Components/VoiceRecorder.razor.cs @@ -41,6 +41,7 @@ public partial class VoiceRecorder : MSGComponentBase private uint numReceivedChunks; private bool isRecording; + private bool isPreparing; private bool isTranscribing; private FileStream? currentRecordingStream; private string? currentRecordingPath; @@ -58,6 +59,9 @@ public partial class VoiceRecorder : MSGComponentBase { if (toggled) { + this.isPreparing = true; + this.StateHasChanged(); + try { // Warm up sound effects: @@ -94,6 +98,7 @@ public partial class VoiceRecorder : MSGComponentBase this.currentRecordingMimeType = actualMimeType; this.Logger.LogInformation("Audio recording started with MIME type: '{ActualMimeType}'.", actualMimeType); + this.isPreparing = false; this.isRecording = true; } catch (Exception e)