Skip to content

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

Fix duplicate start callbacks

grohith327336c5351f9c2
diff --git a/Package.resolved b/Package.resolved
index fa6f2462..fe1ee4fc 100644
--- a/Package.resolved
+++ b/Package.resolved
@@ -18,6 +18,15 @@
"revision" : "708f31da5319436c64059ee7ae566953407063d7"
}
},
+ {
+ "identity" : "eventsource",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mattt/EventSource.git",
+ "state" : {
+ "revision" : "a3a85a85214caf642abaa96ae664e4c772a59f6e",
+ "version" : "1.4.1"
+ }
+ },
{
"identity" : "fluidaudio",
"kind" : "remoteSourceControl",
@@ -63,6 +72,24 @@
"version" : "6.22.1"
}
},
+ {
+ "identity" : "swift-asn1",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-asn1.git",
+ "state" : {
+ "revision" : "a9a5efd40eaf558a2bcd48d64b1d1646be686008",
+ "version" : "1.7.1"
+ }
+ },
+ {
+ "identity" : "swift-atomics",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-atomics.git",
+ "state" : {
+ "revision" : "0442cb5a3f98ab802acb777929fdb446bda11a34",
+ "version" : "1.3.1"
+ }
+ },
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
@@ -72,6 +99,24 @@
"version" : "1.3.0"
}
},
+ {
+ "identity" : "swift-crypto",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-crypto.git",
+ "state" : {
+ "revision" : "47d3869a7291f085c1fb9fb1e6d3b97a793f45c6",
+ "version" : "4.5.1"
+ }
+ },
+ {
+ "identity" : "swift-huggingface",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/huggingface/swift-huggingface.git",
+ "state" : {
+ "revision" : "b721959445b617d0bf03910b2b4aced345fd93bf",
+ "version" : "0.9.0"
+ }
+ },
{
"identity" : "swift-jinja",
"kind" : "remoteSourceControl",
@@ -81,13 +126,31 @@
"version" : "2.3.1"
}
},
+ {
+ "identity" : "swift-nio",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-nio.git",
+ "state" : {
+ "revision" : "0b18836bd8b0162e7e17a995a3fbee20ed8f3b2b",
+ "version" : "2.101.3"
+ }
+ },
+ {
+ "identity" : "swift-system",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-system.git",
+ "state" : {
+ "revision" : "b5544ba79a70a0cb3563e75bf26dc198d6b40ed3",
+ "version" : "1.7.4"
+ }
+ },
{
"identity" : "swift-transformers",
"kind" : "remoteSourceControl",
"location" : "https://github.com/huggingface/swift-transformers",
"state" : {
- "revision" : "573e5c9036c2f136b3a8a071da8e8907322403d0",
- "version" : "1.1.6"
+ "revision" : "2fa33e1f5e7131a7fc64c28e6d161dcec0d24820",
+ "version" : "1.3.3"
}
},
{
@@ -107,6 +170,15 @@
"revision" : "200046c93f6d5d78a6d72bfd9c0b27a95e9c0a2b",
"version" : "1.2.0"
}
+ },
+ {
+ "identity" : "yyjson",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/ibireme/yyjson.git",
+ "state" : {
+ "revision" : "8b4a38dc994a110abaec8a400615567bd996105f",
+ "version" : "0.12.0"
+ }
}
],
"version" : 2
diff --git a/Sources/Fluid/Services/ASRService.swift b/Sources/Fluid/Services/ASRService.swift
index 7d5c8e76..8e3742a8 100644
--- a/Sources/Fluid/Services/ASRService.swift
+++ b/Sources/Fluid/Services/ASRService.swift
@@ -1331,6 +1331,8 @@ final class ASRService: ObservableObject {
DebugLogger.shared.warning("⚠️ START() blocked - already running (started: \(self.isRunning), starting: \(self.isStarting))", source: "ASRService")
return
}
+ self.isStarting = true
+ defer { self.isStarting = false }
// Reset media pause state for this session
self.didPauseMediaForThisSession = false
@@ -1365,8 +1367,6 @@ final class ASRService: ObservableObject {
self.benchmarkLog("recording_start model=\(dims.model) provider=\(dims.provider) supportsStreaming=\(SettingsStore.shared.selectedSpeechModel.supportsStreaming)")
DebugLogger.shared.debug("✅ Buffers cleared", source: "ASRService")
- self.isStarting = true
- defer { self.isStarting = false }
self.isDictionaryTrainingCaptureActive = false
do {