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 Flash provider force unwrap lint violation

altic-devd22cbfe19288
diff --git a/Sources/Fluid/Services/ParakeetRealtimeProvider.swift b/Sources/Fluid/Services/ParakeetRealtimeProvider.swift
index c8deba3d..c350cafc 100644
--- a/Sources/Fluid/Services/ParakeetRealtimeProvider.swift
+++ b/Sources/Fluid/Services/ParakeetRealtimeProvider.swift
@@ -135,7 +135,14 @@ final class ParakeetRealtimeProvider: TranscriptionProvider {
}
private static func cacheRootDirectory() -> URL {
- FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first!
+ let baseDirectory =
+ FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first
+ ?? FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent(
+ "Library/Application Support",
+ isDirectory: true
+ )
+
+ return baseDirectory
.appendingPathComponent("FluidAudio", isDirectory: true)
.appendingPathComponent("Models", isDirectory: true)
.appendingPathComponent("parakeet-eou-streaming", isDirectory: true)