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
Let a finished meeting be transcribed again in another language.
ParamKatariaa0bf8f3ea1d7
diff --git a/Sources/Fluid/Services/Meeting/MeetingModels.swift b/Sources/Fluid/Services/Meeting/MeetingModels.swiftindex 2ac38ba5..11187d4b 100644--- a/Sources/Fluid/Services/Meeting/MeetingModels.swift+++ b/Sources/Fluid/Services/Meeting/MeetingModels.swift@@ -1155,12 +1155,12 @@ nonisolated struct MeetingSession: Codable, Identifiable, Equatable, Sendable {throw MeetingModelValidationError.missingSegmentSpeaker}}- for attempt in self.processingAttempts {- if let languageCode = attempt.languageCode,- languageCode != self.languageCode- {- throw MeetingModelValidationError.unsupportedLanguage- }+ // Earlier attempts may record a language used before the user transcribed the saved+ // audio again. The latest recorded attempt is the transcript currently stored.+ if let latestLanguage = self.processingAttempts.compactMap(\.languageCode).last,+ latestLanguage != self.languageCode+ {+ throw MeetingModelValidationError.unsupportedLanguage}}diff --git a/Sources/Fluid/Services/Meeting/MeetingProcessingConfiguration.swift b/Sources/Fluid/Services/Meeting/MeetingProcessingConfiguration.swiftindex fded7aa1..ad38ceb9 100644--- a/Sources/Fluid/Services/Meeting/MeetingProcessingConfiguration.swift+++ b/Sources/Fluid/Services/Meeting/MeetingProcessingConfiguration.swift@@ -72,6 +72,25 @@ nonisolated struct MeetingFinalProcessingConfiguration: Equatable, Sendable {}}+/// Languages a finished meeting can be transcribed in again. Final meeting transcription uses the+/// multilingual Parakeet model, so the choice is that model's language set, not the dictation model+/// currently selected for live typing.+enum MeetingRetranscriptionLanguage {+ static func canonicalCode(_ raw: String) -> String? {+ let code = raw.trimmingCharacters(in: .whitespacesAndNewlines)+ guard VoiceEngineLanguageCatalog.parakeetV3LanguageIDs.contains(code) else { return nil }+ return code+ }++ static var choices: [VoiceEngineLanguage] {+ VoiceEngineLanguageCatalog.allLanguages(availableModels: [.parakeetTDT])+ }++ static func displayName(for languageCode: String) -> String {+ Self.choices.first { $0.id == languageCode }?.displayName ?? languageCode+ }+}+/// Inert value snapshot of live-caption ASR configuration. Live captions do no diarization.nonisolated struct MeetingLiveCaptionsConfiguration: Equatable, Sendable {static let defaultModelRepositoryID = "FluidInference/parakeet-realtime-eou-120m-coreml"diff --git a/Sources/Fluid/Services/Meeting/MeetingSessionCoordinator.swift b/Sources/Fluid/Services/Meeting/MeetingSessionCoordinator.swiftindex 95c7243f..46b5f3ac 100644--- a/Sources/Fluid/Services/Meeting/MeetingSessionCoordinator.swift+++ b/Sources/Fluid/Services/Meeting/MeetingSessionCoordinator.swift@@ -648,11 +648,11 @@ final class MeetingSessionCoordinator: ObservableObject {}@discardableResult- func retryProcessing(sessionID: MeetingSessionID) async throws -> MeetingSession {+ func retryProcessing(sessionID: MeetingSessionID, languageCode: String? = nil) async throws -> MeetingSession {guard self.retryTask == nil else { throw MeetingCoordinatorError.activityInProgress }let task = Task { @MainActor [weak self] () throws -> MeetingSession inguard let self else { throw MeetingCoordinatorError.noActiveMeeting }- return try await self.performRetryProcessing(sessionID: sessionID)+ return try await self.performRetryProcessing(sessionID: sessionID, languageCode: languageCode)}self.retryTask = taskdo {@@ -665,7 +665,7 @@ final class MeetingSessionCoordinator: ObservableObject {}}- private func performRetryProcessing(sessionID: MeetingSessionID) async throws -> MeetingSession {+ private func performRetryProcessing(sessionID: MeetingSessionID, languageCode: String?) async throws -> MeetingSession {await self.ensureRestored()guard self.stopTask == nil,self.interruptionTask == nil,@@ -681,7 +681,9 @@ final class MeetingSessionCoordinator: ObservableObject {guard let session = self.activeSession, session.hasRetryableAudio else {throw MeetingCoordinatorError.noRecoverableAudio}- return try await self.beginProcessingRetry(session)+ let prepared = try self.sessionPreparedForRetranscription(session, languageCode: languageCode)+ self.activeSession = prepared+ return try await self.beginProcessingRetry(prepared)}if let offer = self.activeSession {@@ -725,9 +727,28 @@ final class MeetingSessionCoordinator: ObservableObject {self.state = .idle}- self.activeSession = session- self.trackHealth = Dictionary(uniqueKeysWithValues: session.audioTracks.map { ($0.kind, $0.health) })- return try await self.beginProcessingRetry(session)+ let prepared = try self.sessionPreparedForRetranscription(session, languageCode: languageCode)+ self.activeSession = prepared+ self.trackHealth = Dictionary(uniqueKeysWithValues: prepared.audioTracks.map { ($0.kind, $0.health) })+ return try await self.beginProcessingRetry(prepared)+ }++ /// A nil language keeps the session's current language. A new code must be one final meeting+ /// transcription can actually run, and it is stored before processing so a failed attempt still+ /// remembers what the user asked for.+ private func sessionPreparedForRetranscription(+ _ session: MeetingSession,+ languageCode: String?+ ) throws -> MeetingSession {+ guard let languageCode else { return session }+ guard let code = MeetingRetranscriptionLanguage.canonicalCode(languageCode) else {+ throw MeetingCoordinatorError.unsupportedRetranscriptionLanguage+ }+ guard code != session.languageCode else { return session }+ var updated = session+ updated.languageCode = code+ updated.updatedAt = Date()+ return updated}private func beginProcessingRetry(_ inputSession: MeetingSession) async throws -> MeetingSession {@@ -2173,6 +2194,7 @@ enum MeetingCoordinatorError: LocalizedError {case dictationActivecase noCorrectionToUndocase maintenanceInProgress+ case unsupportedRetranscriptionLanguagevar errorDescription: String? {switch self {@@ -2190,6 +2212,8 @@ enum MeetingCoordinatorError: LocalizedError {return "There is nothing to undo."case .maintenanceInProgress:return "FluidVoice is tidying up meeting storage. Try again in a moment."+ case .unsupportedRetranscriptionLanguage:+ return "Choose a language the meeting transcription model supports."}}}diff --git a/Sources/Fluid/UI/MeetingSessionCanvases.swift b/Sources/Fluid/UI/MeetingSessionCanvases.swiftindex 611cbf80..558e9be0 100644--- a/Sources/Fluid/UI/MeetingSessionCanvases.swift+++ b/Sources/Fluid/UI/MeetingSessionCanvases.swift@@ -354,8 +354,10 @@ struct MeetingResultCanvas: View {let onMergeSpeakers: (SessionSpeakerID, SessionSpeakerID) -> Voidlet onUndo: () -> Voidlet onRenameSession: (String) -> Void+ let onRetranscribe: (String) -> Voidlet onAssignSpeakers: ([SessionSpeakerID: String]) async -> String?let onClose: (() -> Void)?+ var isRetranscribing = falsevar summaryASRService: ASRService? = nil@@ -367,6 +369,8 @@ struct MeetingResultCanvas: View {@State private var pendingUnknownSpeakerName = ""@State private var isRenamingSession = false@State private var pendingRenameSessionText = ""+ @State private var isChoosingRetranscriptionLanguage = false+ @State private var retranscriptionLanguageCode = "en"@State private var isShowingAssignSpeakers = false@State private var assignSpeakersFocus: SessionSpeakerID?@State private var copied = false@@ -574,6 +578,19 @@ struct MeetingResultCanvas: View {} message: {Text("Enter a new title for this meeting.")}+ .sheet(isPresented: self.$isChoosingRetranscriptionLanguage) {+ MeetingRetranscriptionLanguageSheet(+ languages: MeetingRetranscriptionLanguage.choices,+ selection: self.$retranscriptionLanguageCode,+ isBusy: self.isRetranscribing,+ onCancel: { self.isChoosingRetranscriptionLanguage = false },+ onConfirm: {+ let languageCode = self.retranscriptionLanguageCode+ self.isChoosingRetranscriptionLanguage = false+ self.onRetranscribe(languageCode)+ }+ )+ }// Prevents an echo toggle left on for one meeting from leaking into the next..onChange(of: self.session.id) { _, _ inself.documentSection = .transcript@@ -696,6 +713,11 @@ struct MeetingResultCanvas: View {.disabled(!hasText || self.documentSection != .transcript)Divider()self.renameMeetingAction+ Button("Transcribe in another language…", systemImage: "globe") {+ self.retranscriptionLanguageCode = self.session.languageCode+ self.isChoosingRetranscriptionLanguage = true+ }+ .disabled(!self.isQuiescent || !self.session.hasRetryableAudio || self.isRetranscribing)Button("Undo correction", systemImage: "arrow.uturn.backward", action: self.onUndo).disabled(!self.canUndo || !self.isQuiescent)if self.hasEchoSegments {@@ -777,6 +799,10 @@ struct MeetingResultCanvas: View {Label(self.sourceName, systemImage: self.session.mode == .onlineCall ? "macwindow" : "person.2").lineLimit(1).help("\(self.sourceName)\nMicrophone: \(self.session.selectedMicrophone.displayName)")+ Text("·").accessibilityHidden(true)+ Label(self.transcriptLanguageName, systemImage: "globe")+ .lineLimit(1)+ .help("Transcript language")}.font(self.theme.typography.caption).foregroundStyle(self.theme.palette.secondaryText)@@ -784,10 +810,15 @@ struct MeetingResultCanvas: View {.accessibilityLabel("\(self.session.startedAt.formatted(date: .abbreviated, time: .shortened)), " +"\(Self.durationText(self.session.duration)), \(self.sourceName), " +- "microphone: \(self.session.selectedMicrophone.displayName)"+ "microphone: \(self.session.selectedMicrophone.displayName), " ++ "language: \(self.transcriptLanguageName)")}+ private var transcriptLanguageName: String {+ MeetingRetranscriptionLanguage.displayName(for: self.session.languageCode)+ }+private var sourceName: String {self.session.capturedApplication?.displayName ?? "In-room meeting"}@@ -1224,3 +1255,52 @@ struct MeetingTranscriptTextEditor: View {.interactiveDismissDisabled(self.isSaving)}}++private struct MeetingRetranscriptionLanguageSheet: View {+ let languages: [VoiceEngineLanguage]+ @Binding var selection: String+ let isBusy: Bool+ let onCancel: () -> Void+ let onConfirm: () -> Void++ @Environment(\.theme) private var theme++ var body: some View {+ VStack(alignment: .leading, spacing: self.theme.metrics.spacing.lg) {+ Text("Transcribe in another language")+ .font(self.theme.typography.title)+ Text("The saved audio is transcribed again and replaces this transcript. Choose a language the meeting model supports.")+ .font(self.theme.typography.body)+ .foregroundStyle(self.theme.palette.secondaryText)+ .fixedSize(horizontal: false, vertical: true)+ Menu {+ Picker("Language", selection: self.$selection) {+ ForEach(self.languages) { language in+ Text(language.displayName).tag(language.id)+ }+ }+ .pickerStyle(.inline)+ } label: {+ Text(MeetingRetranscriptionLanguage.displayName(for: self.selection))+ }+ .fluidDropdownStyle(fillsWidth: true)+ .accessibilityLabel("Transcript language")+ .disabled(self.isBusy || self.languages.isEmpty)+ HStack {+ Button("Cancel", action: self.onCancel)+ .meetingGlassAction()+ .keyboardShortcut(.cancelAction)+ .disabled(self.isBusy)+ Spacer()+ Button(self.isBusy ? "Transcribing…" : "Transcribe", action: self.onConfirm)+ .meetingGlassAction(prominent: true)+ .keyboardShortcut(.defaultAction)+ .disabled(self.isBusy || MeetingRetranscriptionLanguage.canonicalCode(self.selection) == nil)+ }+ }+ .padding(self.theme.metrics.spacing.xl)+ .frame(width: 460)+ .background(self.theme.palette.windowBackground)+ .interactiveDismissDisabled(self.isBusy)+ }+}diff --git a/Sources/Fluid/UI/MeetingTranscriptionView.swift b/Sources/Fluid/UI/MeetingTranscriptionView.swiftindex 6d25c0e7..845a8130 100644--- a/Sources/Fluid/UI/MeetingTranscriptionView.swift+++ b/Sources/Fluid/UI/MeetingTranscriptionView.swift@@ -201,6 +201,7 @@ struct MeetingTranscriptionView: View {onStart: self.startRecording,onStop: self.stopAndTranscribe,onRetrySession: { self.retryProcessingSession(id: $0.id) },+ onRetranscribe: { self.retryProcessingSession(id: $0, languageCode: $1) },onRevealAudio: self.revealCapturedAudio,onRecordAgain: self.recordAgain,onCopyTranscript: self.copyTranscript,@@ -752,7 +753,7 @@ struct MeetingTranscriptionView: View {}}- private func retryProcessingSession(id: MeetingSessionID) {+ private func retryProcessingSession(id: MeetingSessionID, languageCode: String? = nil) {guard !self.isRetrying, self.summaryActivity.selectionLock == nil else { return }self.isRetrying = trueself.actionErrorMessage = nil@@ -760,7 +761,7 @@ struct MeetingTranscriptionView: View {Task {defer { self.isRetrying = false }do {- _ = try await self.coordinator.retryProcessing(sessionID: id)+ _ = try await self.coordinator.retryProcessing(sessionID: id, languageCode: languageCode)} catch {self.actionErrorMessage = error.localizedDescription}@@ -1343,6 +1344,7 @@ struct MeetingTranscriptionCanvas: View {let onStart: () -> Voidlet onStop: () -> Voidlet onRetrySession: (MeetingSession) -> Void+ var onRetranscribe: (MeetingSessionID, String) -> Void = { _, _ in }let onRevealAudio: (MeetingSession) -> Voidlet onRecordAgain: (MeetingSession) -> Voidlet onCopyTranscript: (MeetingSession, Bool) -> Void@@ -1463,8 +1465,10 @@ struct MeetingTranscriptionCanvas: View {},onUndo: { self.onUndoCorrection(session.id) },onRenameSession: { title in self.onRenameSession(session.id, title) },+ onRetranscribe: { languageCode in self.onRetranscribe(session.id, languageCode) },onAssignSpeakers: { names in await self.onAssignSpeakers(session.id, names) },onClose: self.onCloseSelection,+ isRetranscribing: self.isRetrying,summaryASRService: self.summaryASRService)}diff --git a/Tests/FluidDictationIntegrationTests/MeetingProviderOptionsTests.swift b/Tests/FluidDictationIntegrationTests/MeetingProviderOptionsTests.swiftindex f967c868..52728a24 100644--- a/Tests/FluidDictationIntegrationTests/MeetingProviderOptionsTests.swift+++ b/Tests/FluidDictationIntegrationTests/MeetingProviderOptionsTests.swift@@ -15,6 +15,19 @@ final class MeetingProviderOptionsTests: XCTestCase {XCTAssertFalse(options.experimentalUnifiedFinalEnabled)}+ func testRetranscriptionLanguageAcceptsParakeetMeetingLanguagesOnly() {+ XCTAssertEqual(MeetingRetranscriptionLanguage.canonicalCode(" de "), "de")+ XCTAssertEqual(MeetingRetranscriptionLanguage.canonicalCode("en"), "en")+ XCTAssertEqual(MeetingRetranscriptionLanguage.canonicalCode("ru"), "ru")+ XCTAssertNil(MeetingRetranscriptionLanguage.canonicalCode("zh"))+ XCTAssertNil(MeetingRetranscriptionLanguage.canonicalCode(" "))+ XCTAssertEqual(MeetingRetranscriptionLanguage.displayName(for: "de"), "German")+ XCTAssertEqual(+ MeetingFinalProcessingConfiguration(languageCode: "de").asrModel,+ "parakeet-tdt"+ )+ }+func testP1DefaultASRModelMatchesSpeechModelRawValue() {XCTAssertEqual(MeetingFinalProcessingConfiguration.defaultASRModel,diff --git a/Tests/FluidDictationIntegrationTests/SpeakerTurnMergingTests.swift b/Tests/FluidDictationIntegrationTests/SpeakerTurnMergingTests.swiftindex 1817d00a..5eaf95b2 100644--- a/Tests/FluidDictationIntegrationTests/SpeakerTurnMergingTests.swift+++ b/Tests/FluidDictationIntegrationTests/SpeakerTurnMergingTests.swift@@ -1670,6 +1670,17 @@ final class MeetingSessionModelTests: XCTestCase {}}+ func testEarlierProcessingAttemptMayRecordPreviousRetranscriptionLanguage() throws {+ var session = MeetingModelFixture.makeSession()+ session.languageCode = "nl"+ session.processingAttempts[0].languageCode = "en"+ var latest = session.processingAttempts[0]+ latest.id = UUID()+ latest.languageCode = "nl"+ session.processingAttempts.append(latest)+ XCTAssertNoThrow(try session.validateForPersistence())+ }+private func assertConfigurationValidationError(_ expected: MeetingModelValidationError,configuration: MeetingCaptureConfiguration,