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

swiftformat with Swift 5 (changed files only)

Harry Hextallac3f78e55c79
diff --git a/Sources/Fluid/Persistence/FileTranscriptionHistoryStore.swift b/Sources/Fluid/Persistence/FileTranscriptionHistoryStore.swift
index 5acee844..3f31fe21 100644
--- a/Sources/Fluid/Persistence/FileTranscriptionHistoryStore.swift
+++ b/Sources/Fluid/Persistence/FileTranscriptionHistoryStore.swift
@@ -119,7 +119,7 @@ final class FileTranscriptionHistoryStore: ObservableObject {
let entry = FileTranscriptionEntry(from: result)
self.entries.insert(entry, at: 0)
- if self.entries.count > maxEntries {
+ if self.entries.count > self.maxEntries {
self.entries.removeLast()
}
diff --git a/Sources/Fluid/Services/MeetingTranscriptionService.swift b/Sources/Fluid/Services/MeetingTranscriptionService.swift
index f3a1367d..7f7539d6 100644
--- a/Sources/Fluid/Services/MeetingTranscriptionService.swift
+++ b/Sources/Fluid/Services/MeetingTranscriptionService.swift
@@ -48,12 +48,12 @@ struct TranscriptionResult: Identifiable, Sendable, Codable {
func encode(to encoder: Encoder) throws {
var c = encoder.container(keyedBy: CodingKeys.self)
- try c.encode(text, forKey: .text)
- try c.encode(confidence, forKey: .confidence)
- try c.encode(duration, forKey: .duration)
- try c.encode(processingTime, forKey: .processingTime)
- try c.encode(fileName, forKey: .fileName)
- try c.encode(timestamp, forKey: .timestamp)
+ try c.encode(self.text, forKey: .text)
+ try c.encode(self.confidence, forKey: .confidence)
+ try c.encode(self.duration, forKey: .duration)
+ try c.encode(self.processingTime, forKey: .processingTime)
+ try c.encode(self.fileName, forKey: .fileName)
+ try c.encode(self.timestamp, forKey: .timestamp)
}
}
@@ -67,7 +67,7 @@ final class MeetingTranscriptionService: ObservableObject {
@Published var error: String?
@Published var result: TranscriptionResult?
- // Share the ASR service instance to avoid loading models twice
+ /// Share the ASR service instance to avoid loading models twice
private let asrService: ASRService
init(asrService: ASRService) {
diff --git a/Sources/Fluid/UI/MeetingTranscriptionView.swift b/Sources/Fluid/UI/MeetingTranscriptionView.swift
index 2bcbf199..7dd9b08b 100644
--- a/Sources/Fluid/UI/MeetingTranscriptionView.swift
+++ b/Sources/Fluid/UI/MeetingTranscriptionView.swift
@@ -201,9 +201,11 @@ struct MeetingTranscriptionView: View {
.stroke(self.theme.palette.cardBorder.opacity(0.45), lineWidth: 1)
)
)
- .overlay(RoundedRectangle(cornerRadius: 12)
- .strokeBorder(style: StrokeStyle(lineWidth: 2, dash: [8]))
- .foregroundColor(Color.fluidGreen.opacity(0.3)))
+ .overlay(
+ RoundedRectangle(cornerRadius: 12)
+ .strokeBorder(style: StrokeStyle(lineWidth: 2, dash: [8]))
+ .foregroundColor(Color.fluidGreen.opacity(0.3))
+ )
}
}
.fileImporter(
@@ -543,7 +545,9 @@ struct MeetingTranscriptionView: View {
// MARK: - Document for Export
struct TranscriptionDocument: FileDocument {
- static var readableContentTypes: [UTType] { [.plainText, .json] }
+ static var readableContentTypes: [UTType] {
+ [.plainText, .json]
+ }
let result: TranscriptionResult
let format: MeetingTranscriptionView.ExportFormat