Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
format and lint
altic-devd1d86f23505f
diff --git a/Sources/Fluid/Persistence/SettingsStore.swift b/Sources/Fluid/Persistence/SettingsStore.swiftindex 2b92eb68..99cae9ed 100644--- a/Sources/Fluid/Persistence/SettingsStore.swift+++ b/Sources/Fluid/Persistence/SettingsStore.swift@@ -1673,7 +1673,7 @@ final class SettingsStore: ObservableObject {/// Get models filtered by providerstatic func models(for provider: Provider) -> [SpeechModel] {- availableModels.filter { $0.provider == provider }+ self.availableModels.filter { $0.provider == provider }}/// Whether this model is built-in or already downloaded on diskdiff --git a/Sources/Fluid/Services/ASRService.swift b/Sources/Fluid/Services/ASRService.swiftindex d6c93621..11d521d1 100644--- a/Sources/Fluid/Services/ASRService.swift+++ b/Sources/Fluid/Services/ASRService.swift@@ -634,7 +634,7 @@ final class ASRService: ObservableObject {"Transcription completed: '\(result.text)' (confidence: \(result.confidence))",source: "ASRService")-+// Mark first transcription as complete to clear loading stateif !self.hasCompletedFirstTranscription {self.hasCompletedFirstTranscription = true@@ -643,7 +643,7 @@ final class ASRService: ObservableObject {DebugLogger.shared.info("✅ Model warmed up - first transcription completed", source: "ASRService")}}-+// Do not update self.finalText here to avoid instant binding insert in playgroundlet cleanedText = ASRService.applyCustomDictionary(ASRService.removeFillerWords(result.text))DebugLogger.shared.debug("After post-processing: '\(cleanedText)'", source: "ASRService")diff --git a/Sources/Fluid/Theme/ThemeEnvironment.swift b/Sources/Fluid/Theme/ThemeEnvironment.swiftindex 39b694d7..889dbdbf 100644--- a/Sources/Fluid/Theme/ThemeEnvironment.swift+++ b/Sources/Fluid/Theme/ThemeEnvironment.swift@@ -31,9 +31,9 @@ extension Color {var rgb: UInt64 = 0guard Scanner(string: hexSanitized).scanHexInt64(&rgb) else { return nil }- let red = Double((rgb & 0xFF0000) >> 16) / 255.0- let green = Double((rgb & 0x00FF00) >> 8) / 255.0- let blue = Double(rgb & 0x0000FF) / 255.0+ let red = Double((rgb & 0xff0000) >> 16) / 255.0+ let green = Double((rgb & 0x00ff00) >> 8) / 255.0+ let blue = Double(rgb & 0x0000ff) / 255.0self.init(red: red, green: green, blue: blue)}diff --git a/Sources/Fluid/UI/AISettingsView.swift b/Sources/Fluid/UI/AISettingsView.swiftindex bb0259ab..3be8af6a 100644--- a/Sources/Fluid/UI/AISettingsView.swift+++ b/Sources/Fluid/UI/AISettingsView.swift@@ -20,43 +20,41 @@ enum AIConnectionStatus {/// A gentle wave surface that bobs up and downprivate struct LiquidLayer: Shape {- var phase: Double // Phase offset for this layer- var time: Double // Animation time-+ var phase: Double // Phase offset for this layer+ var time: Double // Animation time+var animatableData: Double {- get { time }- set { time = newValue }+ get { self.time }+ set { self.time = newValue }}-+func path(in rect: CGRect) -> Path {var path = Path()let width = Double(rect.width)let height = Double(rect.height)-+// Wave surface very close to the top (only 3% offset for wave amplitude)let baseY = height * 0.03-+path.move(to: CGPoint(x: 0, y: CGFloat(baseY)))-+// Create a gentle, organic wave surfacefor x in stride(from: 0.0, through: width, by: 1.0) {let normalizedX = x / width-+// Slow, gentle wave like water sloshing in a jarlet waveAmplitude = 2.0- let waveFrequency = 1.5 // Lower frequency = broader, more ocean-like waves- let y = baseY + sin((normalizedX * waveFrequency + time * 0.25 + phase) * .pi) * waveAmplitude+ let waveFrequency = 1.5 // Lower frequency = broader, more ocean-like waves+ let y = baseY + sin((normalizedX * waveFrequency + self.time * 0.25 + self.phase) * .pi) * waveAmplitude--path.addLine(to: CGPoint(x: CGFloat(x), y: CGFloat(y)))}-+// Fill down to bottompath.addLine(to: CGPoint(x: CGFloat(width), y: CGFloat(height)))path.addLine(to: CGPoint(x: 0, y: CGFloat(height)))path.closeSubpath()-+return path}}@@ -68,22 +66,22 @@ private struct LiquidBar: View {let secondaryColor: Colorlet icon: Stringlet label: String-+// Animated fill level (smoothly transitions between values)@State private var animatedFill: Double = 0-+var body: some View {VStack(spacing: 8) {// LabelHStack(spacing: 4) {- Image(systemName: icon)+ Image(systemName: self.icon).font(.system(size: 10))- .foregroundStyle(color)- Text(label)+ .foregroundStyle(self.color)+ Text(self.label).font(.system(size: 10, weight: .bold)).foregroundStyle(.secondary)}-+// Liquid Container (Capsule Glass)ZStack(alignment: .bottom) {// Background (Empty glass interior)@@ -100,19 +98,19 @@ private struct LiquidBar: View {lineWidth: 1.5))-+// Single clean liquid layer with animated heightGeometryReader { geo in- let displayHeight = geo.size.height * CGFloat(animatedFill)-- TimelineView(.animation(minimumInterval: 1.0/30.0)) { timeline in+ let displayHeight = geo.size.height * CGFloat(self.animatedFill)++ TimelineView(.animation(minimumInterval: 1.0 / 30.0)) { timeline inlet time = timeline.date.timeIntervalSinceReferenceDate-+// Single organic liquid surfaceLiquidLayer(phase: 0.0, time: time).fill(LinearGradient(- colors: [color, secondaryColor],+ colors: [self.color, self.secondaryColor],startPoint: .bottom,endPoint: .top)@@ -123,7 +121,7 @@ private struct LiquidBar: View {}.clipShape(Capsule()).padding(3)-+// Glass highlight (3D glossy effect)Capsule().fill(@@ -131,7 +129,7 @@ private struct LiquidBar: View {stops: [.init(color: .white.opacity(0.25), location: 0),.init(color: .white.opacity(0.08), location: 0.25),- .init(color: .clear, location: 0.5)+ .init(color: .clear, location: 0.5),],startPoint: .topLeading,endPoint: .bottomTrailing@@ -141,30 +139,26 @@ private struct LiquidBar: View {.allowsHitTesting(false)}.frame(width: 48, height: 90)-+// Percentage (shows target, not animated)- Text("\(Int(fillPercent * 100))%")+ Text("\(Int(self.fillPercent * 100))%").font(.system(size: 11, weight: .bold, design: .rounded))- .foregroundStyle(fillPercent > 0 ? color : .secondary)+ .foregroundStyle(self.fillPercent > 0 ? self.color : .secondary).contentTransition(.numericText())}.onAppear {// Initialize to target on first appear- animatedFill = fillPercent+ self.animatedFill = self.fillPercent}- .onChange(of: fillPercent) { _, newValue in+ .onChange(of: self.fillPercent) { _, newValue in// Animate liquid level change with a gentle "sloshing" feelwithAnimation(.interpolatingSpring(stiffness: 140, damping: 18)) {- animatedFill = newValue+ self.animatedFill = newValue}}}}----private enum PromptEditorMode: Identifiable, Equatable {case defaultPromptcase newPrompt@@ -629,10 +623,10 @@ struct AISettingsView: View {self.activateSpeechModel(model)}.buttonStyle(.borderedProminent)- .controlSize(.small)+ .controlSize(.small).tint(.green)- .fontWeight(.semibold)- .shadow(color: .green.opacity(0.35), radius: 4, x: 0, y: 1)+ .fontWeight(.semibold)+ .shadow(color: .green.opacity(0.35), radius: 4, x: 0, y: 1).disabled(self.asr.isRunning)}@@ -746,7 +740,6 @@ struct AISettingsView: View {SettingsStore.shared.selectedSpeechModel == model}-/// Returns the appropriate description text for the currently selected speech modelprivate var modelDescriptionText: String {let model = SettingsStore.shared.selectedSpeechModel@@ -1218,7 +1211,7 @@ struct AISettingsView: View {set: { SettingsStore.shared.enableAIStreaming = $0 })).toggleStyle(.checkbox)-+Toggle("Show Thinking Tokens", isOn: Binding(get: { SettingsStore.shared.showThinkingTokens },set: { SettingsStore.shared.showThinkingTokens = $0 }@@ -1242,7 +1235,6 @@ struct AISettingsView: View {// Help Sectionif self.showHelp { self.helpSectionView }-// Provider/Model Configuration (only shown when AI Enhancement is enabled)if self.enableAIProcessing {HStack(spacing: 12) {@@ -1346,8 +1338,6 @@ struct AISettingsView: View {private var providerConfigurationSection: some View {VStack(alignment: .leading, spacing: 10) {--self.providerPickerRowif self.showingEditProvider { self.editProviderSection }@@ -1355,7 +1345,7 @@ struct AISettingsView: View {if self.selectedProviderID == "apple-intelligence" { self.appleIntelligenceBadge }// API Key Management- if self.selectedProviderID != "apple-intelligence" {+ if self.selectedProviderID != "apple-intelligence" {HStack(spacing: 8) {Button(action: { self.handleAPIKeyButtonTapped() }) {Label("Add or Modify API Key", systemImage: "key.fill")@@ -1378,7 +1368,6 @@ struct AISettingsView: View {}}-// Model Rowif self.selectedProviderID == "apple-intelligence" {self.appleIntelligenceModelRow@@ -1388,7 +1377,6 @@ struct AISettingsView: View {if self.showingReasoningConfig { self.reasoningConfigSection }}-// Connection Testif self.selectedProviderID != "apple-intelligence" {self.connectionTestSection@@ -1982,7 +1970,6 @@ struct AISettingsView: View {Spacer()}-// Dictation Prompts (multi-prompt system)VStack(alignment: .leading, spacing: 10) {HStack {